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

how to copy work item from one project area to other programmatically using IWorkItemClient

how to copy work item from one project area to other programmatically using IWorkItemClient

0 votes



2 answers

Permanent link
I don't know a good way to easily do this, but you can use the logic of:
1) connect to project area 1
2) read work item data
3) connect to project area 2
4) create new (empty) work item and then set the values of the attributes from the first work item to the new work item data
5) save new work item (in project area 2)

We do something similar in some "bridge" code that we have that takes a work item from one server and creates a new one on a different server (different team) and then sync'd comments and status back and forth.

Susan

0 votes


Permanent link
Use the concrete class definition, WorkItem instead of IWorkItem (cast the IWorkItem to WorkItem)

WorkItem has a setProjectArea() method.  you will need to have the working copy, and change the category, etc..

similar classes provide methods for comments, approvals, attachments.

they are usually internals however..

this only works on the same server of course..

0 votes

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
× 12,029

Question asked: Mar 31 '14, 10:40 a.m.

Question was seen: 6,306 times

Last updated: Mar 31 '14, 11:32 p.m.

Confirmation Cancel Confirm