Progressing an issue in a workflow
This is something everyone wants to do when JIRA is integrated with third-party applications. The status of an issue needs to be changed for various use cases and the right way to do this is to progress the issue through its workflow.
Progressing will move the issue to the appropriate statuses and will fire the appropriate post functions and events. In this recipe, we will see how to do this.
Getting ready
As usual, create a JIRA REST client as mentioned in the Writing a Java client for the REST API recipe.
How to do it...
JRJC exposes the transition
method inside the IssueRestClient
to progress an issue through its workflow. The following are the steps to do it:
Identify the list of transitions available for the issue.
Promise<Iterable<Transition>> transitions = jiraRestClient.getIssueClient().getTransitions(browsedIssue.getTransitionsUri());
Iterate over the list and identify the transition to be performed by name as follows. You can skip this step...