How to get a project area from a WorkItem
Hi there,
Can anyone point me towards any docs about how to get a hold of the project area that a particular WorkItem has come from programmatically please? Many thanks. |
3 answers
Hi there, I'm getting there slowly with this by doing the following:
However, doing this causes me the following exception: 11:22:21,125 ERROR com.ibm.team.repository.client.util.ThreadCheck - Long-running operations prohibited on this thread java.lang.IllegalStateException: Long-running operations prohibited on this thread at com.ibm.team.repository.client.util.ThreadCheck.checkLongOpsAllowed(ThreadCheck.java:117) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:81) at $Proxy0.fetchOrRefreshItems(Unknown Source) at com.ibm.team.repository.client.internal.ItemManager$3.run(ItemManager.java:1561) at com.ibm.team.repository.client.internal.ItemManager$3.run(ItemManager.java:1) at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1169) at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79) at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1162) at com.ibm.team.repository.client.internal.TeamPlatformObject.callCancelableService(TeamPlatformObject.java:41) at com.ibm.team.repository.client.internal.ItemManager.internalFetchItem(ItemManager.java:1556) at com.ibm.team.repository.client.internal.ItemManager.access$0(ItemManager.java:1538) at com.ibm.team.repository.client.internal.ItemManager$AbstractStore.retrieveItem(ItemManager.java:186) at com.ibm.team.repository.client.internal.ItemManager$CurrentStore.fetchItem(ItemManager.java:311) at com.ibm.team.repository.client.internal.ItemManager.fetchPartialItem(ItemManager.java:1059) at com.ibm.team.workitem.client.internal.AuditableClient.resolveAuditable(AuditableClient.java:131) at com.ibm.team.workitem.common.internal.WorkItemCommon.findProcessArea(WorkItemCommon.java:760) ...... Any advice/doc on how I should be doing this to avoid getting this exception please? Thanks, |
Jared Burns (4.5k●2●9)
| answered Jun 04 '10, 10:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Thu, 03 Jun 2010 10:38:03 +0000, smithsj wrote:
11:22:21,125 ERROR What you're seeing here is code which prevents you from performing network operations in the UI thread. We require that all network requests are made in background threads in order to keep the UI responsive. The most common way to get code into background threads is to use a Job (org.eclipse.core.runtime.jobs.Job). - Jared |
Hi there, com.ibm.team.workitem.common.model.IWorkItem.getProjectArea() -- Regards, Patrick Jazz Work Item Team |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.