It's all about the answers!

Ask a question

Programmatic updation of work items


Kamal Suruguchi (15112114) | asked Jun 10 '11, 1:47 a.m.
Can someone point me to an example for updating work items in RTC?

I saw the work item creation here: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation

but a similar plain Java client example would be great. Thanks in advance.

3 answers



permanent link
Nicolás Rodríguez (3142125) | answered Jul 27 '12, 1:06 p.m.
This is for client side?
how can i do this in server side? 
i need to update a workitem in an OperationParticipant

permanent link
Ralph Schoon (63.1k33646) | answered Jun 15 '11, 9:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
It works in the plain Java API.

Thanks,

Ralph

permanent link
Ralph Schoon (63.1k33646) | answered Jun 15 '11, 9:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Can someone point me to an example for updating work items in RTC?

I saw the work item creation here: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation

but a similar plain Java client example would be great. Thanks in advance.


Hi, this is code I think I found on this forum and works for me:


IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.SMALL_PROFILE, null);
IWorkItemWorkingCopyManager wcm = workItemClient.getWorkItemWorkingCopyManager();
wcm.connect(workItem, IWorkItem.FULL_PROFILE, null);

try {
WorkItemWorkingCopy wc = wcm.getWorkingCopy(workItem);

wc.getWorkItem().setHTMLSummary(XMLString.createFromPlainText(summary));
IDetailedStatus s = wc.save(null);
if (!s.isOK()) {
throw new TeamRepositoryException("Error saving work item",
s.getException());
}
} finally {
wcm.disconnect(workItem);
}

System.out.println("Modified work item: " + workItem.getId() + ".");

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.