Use API to move item from one ProjectArea to another
I haven't been able to find a way to use the REST API directly to change the project area for a work item from one to another. I send along either this package:
{ "rtc_cm:projectArea": "New Project Area" }
or
{ "rtc_cm:projectArea": "https://server/ccm/oslc/projectareas/_asdfasdfasdf"}
or
{ "rtc_cm:projectArea":{ "rdf:resource": "https://server/ccm/oslc/projectareas/_saasdfasd"}}
and none of them actually change the project area, but none offer any error, either.
|
Accepted answer
Ralph Schoon (63.3k●3●36●46)
| answered Feb 03 '15, 1:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Because work items "live" in a project area and each project area has its own process, you can not just change the project area. You have to create a new work item in another project area and set the values as appropriate for the process that project area uses.
This is the reason why there is actually a move to project area in the tool, that does all this copy/mapping. John Martin selected this answer as the correct answer
Comments
John Martin
commented Feb 03 '15, 8:23 a.m.
Thanks, Ralph. It's disappointing when the tool can do something that the API won't allow.
Ralph Schoon
commented Feb 03 '15, 8:46 a.m.
| edited Feb 03 '15, 8:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I did not say the API would not allow to do this. I just meant to say that this is not just changing one work item attribute, as far as I can tell.
With the REST API you would likely have to do a little bit more, e.h. to find the mapping enumeration literals. Not sure, I am not an OSLC/REST expert.
1
Marko Tomljenovic
commented Feb 13 '15, 7:54 a.m.
Hi Ralph,
can I use the command line tool to move a work item from one project area to a different one in the same repository?
If so could you give an example of the command line call.
I couldn't find any example here: https://rsjazz.wordpress.com/2015/02/09/a-rtc-workitem-command-line-version-2/
Sincerely, Marko
Ralph Schoon
commented Feb 13 '15, 8:15 a.m.
| edited Feb 13 '15, 8:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As explained in that blog, you can't.
Special Properties Handling
However, there are tools that you could use, the action in the tool for one work item or the Bulk Move tools
See https://jazz.net/wiki/bin/view/Main/BulkMoveWorkItemsBetweenProjectAreas
|
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.