Programaticly appending comments to work items
![]()
I've been using the Plain-Java API to fetch work items from an RTC team area. I then try to append a comment to the work item. When doing so a com.ibm.team.repository.common.internal.ImmutablePropertyException is thrown.
I followed the example here to connect to the repository https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation#Plain_Java_Client and the comments here https://jazz.net/forums/viewtopic.php?t=2959&highlight=api+comments to try and append a comment. Below is the relevant code snippet:
Any ideas as to why I'm unable to modify the work item? |
2 answers
![]()
Hi jmilam,
Now I got an answer about this!I suffer from same thing. IWorkItem workingCopy = You got *Immutable* WorkItem at this line. If you momdify workitem, you get WorkingCopy from WorkItem. WorkingCopy has same interface from that Object.so I'll show you the statements. IWorkItem workitem = workItemClient.findWorkItemById(456,IWorkItem.FULL_PROFILE, null); IWorkItem workingCopy = (IWorkItem)workitem.getWorkingCopy(); Regards, Hiroki Kondo jmilam wrote: I've been using the Plain-Java API to fetch work items from an RTC |
![]()
The Wiki page
https://jazz.net:443/wiki/bin/view/Main/ProgrammaticWorkItemCreation also has some examples of how to create work items in a plain Java context. -- Regards, Patrick Jazz Work Item Team |
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.