Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Programmatic updation of work items

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.

0 votes



3 answers

Permanent link
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() + ".");

0 votes


Permanent link
It works in the plain Java API.

Thanks,

Ralph

0 votes


Permanent link
This is for client side?
how can i do this in server side? 
i need to update a workitem in an OperationParticipant

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,948

Question asked: Jun 10 '11, 1:47 a.m.

Question was seen: 5,771 times

Last updated: Jul 27 '12, 1:06 p.m.

Confirmation Cancel Confirm