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

How to change a Work Item state via server side plugin using server side SDK -

 Hi All,


We are trying to perform some backend actions via Participant plugin (Server side). Once the actions are done want to change the sate of the work item from New to In Progress. I got a code on how its done in client side plugin. But we are trying to achieve this action on server side plugin. Can you please help me with in doing this. A small code snippet that is performing state change will be of great help.

Thanks in advance
Farheen

0 votes


Accepted answer

Permanent link

 I have tried to explain this here: https://rsjazz.wordpress.com/2012/11/26/manipulating-work-item-states/ .

The IWorkItem interface is available in the client and server API and exposes the deprecated method com.ibm.team.workitem.common.model.IWorkItem.setState2(Identifier<IState>). As explained that should not be used. To change a state of a work item is to apply a workflow action. In the server API you should use com.ibm.team.workitem.service.IWorkItemServer.saveWorkItem3(IWorkItem, IWorkItemReferences, String, Set<String>) or com.ibm.team.workitem.service.IWorkItemServer.saveWorkItem2(IWorkItem, IWorkItemReferences, String) and provide the workflow action to change the state. 

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

This solution helped me in implementing state change. Thanks for the quick response :) 

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,937

Question asked: Aug 03 '23, 9:00 a.m.

Question was seen: 514 times

Last updated: Aug 07 '23, 6:44 a.m.

Confirmation Cancel Confirm