Altering a work item
I've got the work item I want to alter (by id) but when I try something like workItem.setHTMLSummary(XMLString.createFromPlainText("Test Editing work item")); to change the summary it throw an exception saying the work item is immutable which can't be changed, here's what I've got so far :
IWorkItemHandle handle = (IWorkItemHandle) workItem.getItemHandle(); I'm also aware that in wc.save and copiedWorkItem.setValue I need a monitor but I'm not sure what kind to use. Any help with this matter would be greatly appreciated. |
2 answers
Check with the isImmutable() method to make sure you can alter the workitem instance.
I'm don't have any experience trying to do this client side, but you should be able to extract a mutable version with the getWorkingCopy method. I've got the work item I want to alter (by id) but when I try something like workItem.setHTMLSummary(XMLString.createFromPlainText("Test Editing work item")); to change the summary it throw an exception saying the work item is immutable which can't be changed, here's what I've got so far : |
Turns out my code works I just needed to close the online access to the repository and re-open it before the changes showed up, silly me
|
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.