Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

1 vote


Accepted answer

Permanent link
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

0 votes

Comments

Thanks, Ralph.  It's disappointing when the tool can do something that the API won't allow.

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.

Using the API you can basically also create a new work item and copy the data over (and delete the old one). You would have to do all the mapping for all the values needed. It is not trivial but it can definitely be done. If you look into the RTC Eclipse client SDK, you might even be able to find the code that does it. Otherwise https://rsjazz.wordpress.com/2015/01/12/a-rtc-workitem-command-line/ should answer most of the API questions you might have.

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.

 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.

Sincerely, Marko

1 vote

As explained in that  blog, you can't.

Special Properties Handling

Some special properties are protected from changing.

  • Work Item ID: can not be changed
  • Project Area: parameter “projectArea” can only be specified when creating the work item. It can not be set to a different value later.

There might be other limitations imposed by the process e.g. against changing the creator of a work item.

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

Move really is copying the data, create a new work item in the other PA and assign the data, including a mapping process. The work item commandline currently allows only to create and update work items. There is no copy work items, let alone across project areas at this time.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Feb 02 '15, 10:24 p.m.

Question was seen: 3,338 times

Last updated: Feb 13 '15, 8:16 a.m.

Confirmation Cancel Confirm