RTC Server Extension to save work item
I tried using method in follow-up actions :
fWorkItemServer = getService(IWorkItemServer.class);
IWorkItem workingCopy = (IWorkItem) fWorkItemServer
.getAuditableCommon()
.resolveAuditable(workItem, IWorkItem.FULL_PROFILE, monitor)
.getWorkingCopy();
workingCopy.setHTMLDescription(XMLString.createFromPlainText("XXXXX"));
IStatus saveStatus = fWorkItemServer.saveWorkItem2(workingCopy, null, null);
to save work item changes, but it only succeeded when the status of the work item changed. If I change other data but do not modify the status, the execution cannot succeed, and no error is reported.
Are there other methods to save work item modifications?
Accepted answer
Have you looked at any of the examples here: https://rsjazz.wordpress.com/?s=saveWorkItem&submit=Search ?
There are several follow up actions that do similar things - including code - in my blog.
I have done this countless times and I find it quite unbelievable that you do not get a save status or an exception.
If you follow the extensions workshop you should also be able to step through the code. This would also allow you to easily look at the interfaces to see which methods are available (e.g. saveWorkItem3()) and search for the usage of saveWorkItem*() in the SDK code.
If you follow the extensions workshop you should also be able to step through the code. This would also allow you to easily look at the interfaces to see which methods are available (e.g. saveWorkItem3()) and search for the usage of saveWorkItem*() in the SDK code.