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

How to copy a work item and create a new work item from RTC participant ?

 Hi, I am working on a project where i have to create exact copies of the work item when save button is clicked. I understand that it needs to be done through a participant. Please help me out with the server APIs to get this done. Any help is much appreciated.


I have tried below link and there's no code sample, seems like it was removed.

Thanks in advance.

0 votes


Accepted answer

Permanent link

 Several participant examples can be found here https://rsjazz.wordpress.com/?s=participant&submit=Search

More related api is here:https://rsjazz.wordpress.com/?s=work+item+attributes&submit=Search I am not sure there is a duplicate work item in the common or server API so you could readily use it. You can search the SDK though.

You can iterate the attributes and copy them/set the attribute in the copy relatively easily, if the work items are all in the same project area though.

Nagendra Prasad selected this answer as the correct answer

1 vote

Comments

Thanks much for the answer and links Ralph, they were pretty useful. Is there a server API that returns list of all attributes of a work item ? There's workItem.getCustomAttributes() which returns custom attribute list, but i'm interested in all the attributes of a work items in particular. I saw an example of getting built-in attributes from a project area, but that's too much for a loop!

See https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ section

Getting the Work Item's Attributes in the API

Check the IWorkItem and the IWorkItemCommon interfaces. Why would handling all attributes be too much for a loop? If you want to copy everything, you need to iterate everything.

We have close to 200 attributes in the project area. I'm guessing that iterating everything will take a toll on the performance.

I am at a loss why anyone wants 200 attributes in a project area. There seems to be a serious "customize to death" issue with some of the deployments. This is also likely impacting the performance already.

1 vote

Ha ha, you're right. We're undergoing a simplification process already. Anyhow, thank you for your inputs, i've got enough information to take off.

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,927

Question asked: Nov 19 '18, 4:03 a.m.

Question was seen: 1,335 times

Last updated: Nov 21 '18, 4:12 a.m.

Confirmation Cancel Confirm