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

IWorkItem.setValue() not persisting

Hi-

I've got some code to update a child workitem attribute. The code executes without error, and the update seems to work in the console output. However, when queried in the editor the old value is still present.

...
IAttribute summary = workItemServer.findAttribute(projectArea, "summary", monitor);
IWorkItem childItem = (IWorkItem)item.getFullState().getWorkingCopy();
...
System.out.println("AttrValue: " + childItem.getValue(summary)); >>outputs current value
childItem.setValue(summary, "test");
System.out.println("AttrValue: " + childItem.getValue(summary)); >>console correctly shows 'test'

Missing anything in the implementation to persist the change?

Thanks

0 votes



One answer

Permanent link
Hi
After modifying the work item (working copy), you have to save it to persist the changes (e.g. IWorkItemSever#saveWorkItem2).

Regards

Marcel
Jazz Work Item team

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

Question asked: Nov 24 '08, 4:32 p.m.

Question was seen: 8,012 times

Last updated: Nov 24 '08, 4:32 p.m.

Confirmation Cancel Confirm