Transition Issues

With HAPI, we've made it easy for you to transition issues and even update fields while you transition issues. 

Transitioning issues

To transition an issue, run the following script from the script console:

In this example we're starting progress on an issue.

            def issue = Issues.getByKey('ABC-1')
 
            issue.transition('Start Progress')        
Copy

Image showing how you transition an issue with HAPI

Updating fields while transitioning issues

You can also update fields during a transition. For example: 

In this example we're resolving an issue, setting the resolution, and adding a comment.

            def issue = Issues.getByKey('ABC-1')
 
            issue.transition('Resolve Issue') {
                setResolution('Done')
                setComment('resolving this issue')            
            }        
Copy

Image showing how you update fields while transitioning an issue

See our Javadocs for a full list of fields.

Skipping conditions, validators, and permissions while transitioning issues

You can use transitionOptions to skip conditions, validators and permissions during a transition. For example:

groovy
def issue = Issues.getByKey('ABC-1') issue.transition('To Do') { transitionOptions { skipConditions() skipPermissions() skipValidators() } }



Related content

On this page