It's all about the answers!

Ask a question

WorkItem changing status

Michele Pegoraro (1.8k14118103) | asked Jul 14 '09, 7:25 a.m.
Hi, I'm trying to change a WorkItem status using a client side follow-up plugin. I get the working copy, set the action and save but no action seems to be triggered. I also try insert another modify action like modifing the description and it runs correctly.

This is my code:

String azione = "Start Working";
IWorkItemClient client = (IWorkItemClient)repo.getClientLibrary(IWorkItemClient.class);
IWorkItemWorkingCopyManager WCManager = client.getWorkItemWorkingCopyManager();
WCManager.connect(wiHandle, IWorkItem.FULL_PROFILE, monitor);
WorkItemWorkingCopy wiCopy = WCManager.getWorkingCopy(wiHandle);
String oldContent = wiCopy.getWorkItem().getHTMLDescription().toString();
String out = wiCopy.getWorkflowAction();
IDetailedStatus status =;

I also get the status result of save operation and it gives me OK.
Can I have some help? What is my error?

Accepted answer

permanent link
Ralph Schoon (63.2k33646) | answered Jun 27 '18, 9:42 a.m.

This shows a state change in a server follow up action: the code in the client should be similar. There are several client API examples on the blog.
Here is the link for how to trigger a build from a state change:

Ralph Schoon selected this answer as the correct answer

4 other answers

permanent link
Michele Pegoraro (1.8k14118103) | answered Jul 14 '09, 8:43 a.m.
I've notice that it currently does something, because if I try to set action Resolve from In Progress status (referring to Eclipse Way Default workflow) it moves work item state to New instead of Resolved.
Any help?

permanent link
Marcel Bihr, Jazz Work Item team (1.4k) | answered Jul 14 '09, 9:08 a.m.
You have to pass the id of an action to the workingcopy. To get the set of possible action ids for the current state of a work item, you can use IWorkItemClient#findWorkflowInfo and then WorkflowInfo#getActionIds. Passing one of these ids to the workingcopy should transition the workflow the to end state of that action (which can be accessed programatically using WorklfowInfo#getActionResultState.


Jazz Work Item team

permanent link
Michele Pegoraro (1.8k14118103) | answered Jul 14 '09, 10:34 a.m.
Hi Marcel, thank you for your answer.
Really, I would have never thought that String as input parameter of getWorkflowAction method was a conversion from Id. I really had not understood. Thank you very much.

permanent link
Dhinesh Palanisamy (1510) | answered Jun 27 '18, 8:34 a.m.

Hi Michele,

Am in-between the process of creating custom workitem which will start build when it's staus will change, I have used java client API programs to request Build,Am able to  do this by running as java application. But am not sure how to use this in workitem, how to create an custom workitem to invoke it. could you please help me to sort out. 

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.