RTC Java/Plugin API - How to set a project Area for Work Item?
![]() What's the API method call to set Project Area for the given work item? Basically I am trying to move a Work Item from Project Area 'A' to Project Area 'B'.
try
Note: I have already gone thru https://jazz.net/forum/questions/216707/how-to-move-work-item-to-other-project-area-using-java-client-api and https://jazz.net/forum/questions/53755/move-workitem-from-a-project-area-to-another posts.
CopyToProjectAreaOperation wizard doesn't move the work item. It opens the Work Item in editor and user action is required to save the work item.
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Dec 05 '19, 2:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The Context ID is, the access context and not the owning project area. See https://rsjazz.wordpress.com/2016/02/02/setting-access-control-permissions-for-work-items/ for details.
As far as I can tell, you can not just set the project area. The whole process is tied to to a project area. This includes attribute ID's etc. Even if you use the same process everywhere the same attribute in one project area is not the same attribute in another project area. The IAttribute has different values. You have to do a lot more to do this.
https://github.com/jazz-community/rtc-workitem-bulk-mover-ui does all this and you might want to check how it does it. It is JavaScript, not plain java API. The Eclipse built in Work Item mover is part of the SDK and you can find it in the SDK. I have looked at it and couldn't make a lot of sense of it, however.
Comments
I was not able to find the code in SDK as not all jars/libraries come with java docs/how do documents. Do you know what's the Java SDK call to setup the project area?
On the other side, i have done coding to compare the source attributes, target attributes, workflows, missing attributes, mandatory attributes etc.
I am now just looking for a piece of code (or bunch of lines) to set the project area for the given IWorkItem object.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I would suggest to follow https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ and do the Extensions Workshop. Use the Extensions workshop workspace for API development. Make the projects all plugin projects to be able to use the PDE show the SDK and the Source code.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
"Java SDK call to setup the project area" I can not make sense of this in the current topic. Code to setup project areas are in the snippets that ship with the plain java client libraries.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I think "setup the project area " was a typo ... I believe he just meant "set the project area". ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The work item creation call includes the project area the work item lives in. That sets the project area. I am not aware of a call that sets a different project area.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have published code here: https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and in other posts e.g. https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/
Note, I have tried looking into the SDK code for moving work items and gave up at some time as there was no need. I never figured it out completely.
showing 5 of 6
show 1 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.