How to move work item to other project area using java client API
I want to move workitem from project area to other project area using java client API.
Is there any API which can move work item from project area to other project area.
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Feb 18 '16, 5:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Feb 18 '16, 5:08 a.m.
By opening the Copy/Move Work item Wizard in the Eclipse client and using the Plugin Spy (SHIFT+ALT+F1) on the dialog window you can find and open the wizard class com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaWizard
You can look at the code how they do it. I doubt there is a special API. You have to find the source and target attributes and create a value mapping in any case, because the UUID's and ID's of referenced items are almost certainly different in both project areas in most of the cases. Comments
vikrant kamble
commented Feb 24 '16, 12:58 a.m.
HI Ralph, <o:p> </o:p> I was understanding about class CopyToProjectArea, as you mentioned in your answer in this link , performFinish() method does the move of work item. But I was not able to understand how it happens as this method is called nowhere in CopyToProjectArea.class Any suggestions <o:p> </o:p> It is just a UI pattern and how the wizards (superclass) work. If you had bothered to set a debug break point in a debug eclipse client, you would see how it gets called once you press finish.
Please also note, that the code here is part of the RTC Client SDK. It is not a part of the plain java client libraries and it is also internal code for all I can see. I have looked at that code a while back, because I wanted to do what you are attempting but Did not find the time to really pursue the task,
vikrant kamble
commented Feb 29 '16, 6:33 a.m.
Hi Ralph,
I was unable to set a debug break point in a debug eclipse client, but I studied about performFinish() method,
I believe that
CopyToProjectAreaOperation operation= new CopyToProjectAreaOperation(name, fTargetArea, true, fMove, fResolveSource, fMoveAttachments, fCopyAttachments);
operation.run(fWorkItems.toArray(new IWorkItemHandle[fWorkItems.size()]), monitor);
This code snippet is responsible for moving work item.
Is it right?
I looked at it, and that is used. Note it is com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaOperation which means it is internal client code and not part of the Plain Java Client Libraries.
|
Hi Ralph,
I was surfing on google and jazz.net to find If I can get anything to move work item from project area to another. I did not find client Java API to move work item but I found server API to move work item. Exact code is given in https://jazz.net/forum/questions/53755/move-workitem-from-a-project-area-to-another this link I did it myself and work item is moved to specified project area, Some changes in code needs to be done however. Comments The link above points to this post and not to one with server API.
vikrant kamble
commented Jun 23 '16, 4:11 a.m.
Code is given in the link. If required I can also provide executable code to move work item
If I click the link, I end up in THIS QUESTION
vikrant kamble
commented Jun 23 '16, 4:47 a.m.
My bad, I hyperlinked my own question. I updated my answer
The code is server API. I can't see how this would work in the client API com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaOperation would, but is part of the RTC Eclipse client internal API and not the Plain Java Client Libraries.
Yes code is server API, I developed 'participant' to move work item from project area to other project area on work item save operation.
Hi Ralph,
showing 5 of 7
show 2 more comments
|
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.