It's all about the answers!

Ask a question

IWorkItem.setValue() not persisting


K Shymanski (263) | asked Nov 24 '08, 4:32 p.m.
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

One answer



permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Nov 25 '08, 3:31 a.m.
JAZZ DEVELOPER
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

Your answer


Register or 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.