IWorkSpaceHandle on a server side plugin
![]()
Hi guys
I was wondering, which is the way to retrieve an instance of this object in an OperationParticipant context of a work item save. |
Accepted answer
One other answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Sep 12 '14, 5:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
To resolve an item see https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and other examples on the blog that use hadles and resolve the item (almost all examples have to).
(ITeamArea) teamRepository.itemManager() .fetchCompleteItem(handle, IItemManager.REFRESH, monitor); Comments for who is interested in I got the workItemCommon as service of the abstractService
Please read the blog(s) they explain these things.I did them to not have to answer everything over and over.
Use the Item profiles you think need. The profiles select more or less data.
Thanks Ralph. If you have suggestions also on how to reach the workspace handle would be great.
|
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.
Comments
I don't understand your question. What does an IWorkspaceHandle have anything to do with a work item? Please provide some sample code.
Pheraps my question was not crystal clear.
I'm doing a Server Side Operation Participant on a work item save.
So in the beginning I just have a SaveParameter that refers to the work item and the service that I can reach with AbstracScmService.getService().
The work item is linked with a change set so I can have the changeset component.
From this point going on, how I can have the workspacehandle of where this changeset is lying.
Thanks any suggestions.
Please attach the code that you have so far.
Also note that change sets do not have to reside in a workspace. They may have been suspended or discarded in which case they are not part of any workspace.
In this case i'm sure that the changeset reside in a workspace.
The code is really long so I just attach the way to retrieve the changeset
If needed I also have the ProjectAreaHandle retrieved from the workItem connected to that changeset, but i don't know ho to resolve the ProjectAreaHandle to a ProjectArea
IWorkItem workItem = (IWorkItem) saveParameter.getNewState();
IProjectAreaHandle projectAreaHandle = workItem.getProjectArea();