Introduction
Jira Issues can only be transition between states in a manner that resembles the Workflow of the parent project. In other words, before you begin trying to script the transition of a Jira issue, you must understand the workflow and what the available transitions actually are.
Further to that point, there’s more to transitions that simply changing the status of an issue. Some transitions have criteria. For example, you may want to move an issue from Open to Pending. In order to do so, you may need to select a Pending State, and add a comment. How do you account for that in a script?
Using Groovy and ScriptRunner to transition Jira issues is a pretty straightforward process. So too is this process quite simple if you need to include transition criteria. It’s simple, if you can find a guide on how to do it. As with most of the things I blog about, I couldn’t find instructions for accomplishing this simple task, so I’m writing my own.
Overview
The script we’re going to explore transitions a Jira issue from one state to another, and fills in the criteria required to make the transition a valid one. As