|
Alex,
Is there any SOAP API sample code for changing issue's status via workflow transitioning? Royce, the latest Soapclient can be found at:
https://svn.atlassian.com/svn/public/atlassian/jira-soapclient/tags/atlassian_jira_3_11/src/java/com/atlassian/jira_soapclient/SOAPClient.java In particular you are after: public void testProgressWorkflow(String issueKey)
throws java.rmi.RemoteException
{
System.out.println("Progressing workflow of "+issueKey+"...");
RemoteNamedObject[] availableActions = jiraSoapService.getAvailableActions(token, issueKey);
String actionId = null;
for (int i = 0; i < availableActions.length; i++)
{
RemoteNamedObject availableAction = availableActions[i];
System.out.println("availableAction: " + availableAction.getId() + " - " + availableAction.getName());
if (actionId == null) actionId = availableAction.getId();
}
if (actionId != null)
{
RemoteField[] fieldsForAction = jiraSoapService.getFieldsForAction(token, issueKey, actionId);
for (int i = 0; i < fieldsForAction.length; i++)
{
RemoteField remoteField = fieldsForAction[i];
System.out.println("remoteField: " + remoteField.getId() + " - " + remoteField.getName());
}
RemoteFieldValue[] actionParams = new RemoteFieldValue[]{
new RemoteFieldValue("assignee", new String[]{ClientConstants.LOGIN_NAME})
};
RemoteIssue remoteIssue = jiraSoapService.progressWorkflowAction(token, issueKey, actionId, actionParams);
System.out.println("Progressed workflow of "+remoteIssue.getKey()+" to: " + remoteIssue.getStatus());
}
}
Cheers, Hi Royce,
If you have further questions please ask on JIRA Dev Forum Cheers, Thanks Anton and Nick. I got the workflow transition working.
|
||||||||||||||||||||||||||||||||||||||||||||||||
It should not be possible to change iisues status using create or update operations. The same is true when you use the web interface. An issue's status can only be changed by transitioning the issue trhough workflow.
This is currently possible with SOAP in JIRA, but not with XML-RPC.
Cheers,
Anton