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

Updating multiple work items

If I have list of two or more workitems and I want to perform Save operation on all of them.
It is something like I have to set values from parent attribute to the same attribute in children.
How Can it be done ?

If I save 1 work item in the list then other work items in the list are lost as run() method is called again.

Please suggest something.
Thanks in advance.

1

0 votes



2 answers

Permanent link
Hi Sarthak
Do you have a adviser or participant which will update the parent work item on save of the child work item??
In that case if you try to save both parent and child then the parent save fail with stale data Exception.
You need to save all the children first then load the parent and update it and save.

1 vote

Comments

I am doing it using participant and I am traversing all the children work items and then I am trying to save them using saveWorkItem2() method. But is going through only 1 work item repeatedly.

Basic requirement is to traverse up to the root work item(in the tree) and then saving all the children workitems according to some condition.


Permanent link
Sarthak,

I am not sure which run() method you refer to.

Dependent of the context you will have to run several save or modify operation.

On the server you can use saveWorkitem2() or saveWorkitem3() as used in https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

Using the client API you can use the same WorkItemOperation used in save https://rsjazz.wordpress.com/2012/08/02/subscribing-to-a-work-item-using-the-java-api/

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
× 10,936
× 411

Question asked: Aug 27 '12, 4:16 a.m.

Question was seen: 4,735 times

Last updated: Aug 30 '12, 2:43 a.m.

Confirmation Cancel Confirm