filter Filter Blog

New to Jira Jira Administration

Oh, Behave! Understanding Jira Workflow Transition Behaviors

by Jenny Choban on October 11, 2018

Statuses and transitions are the heart and bones of Jira workflows. However, you'll get more out of your workflows if you dig into the details and use behaviors on your transitions. This is where you can build compliance into your processes, deploy automation and amp up efficiency. 

Types of Workflow Transition Behaviors

There are four different types of transition behaviors in Jira:

Triggers

Designed for software developers, triggers make your Jira workflow responsive to work that’s happening in linked development tools (Bitbucket, FishEye/Crucible, GitHub). If you’re not using Jira for software development, or aren’t using those development tools, you can safely ignore triggers. If you are using them, follow these instructions from Atlassian to integrate them with your Jira workflow.

Conditions

A condition allows or prevents a workflow transition from taking place. Conditions can be used to control who transitions an issue (only users who are members of certain groups, only users who have certain permissions, only the assignee, etc.). Conditions can also be used to ensure that an issue has passed through a required status, or that a fields contains a required value. Employing conditions on your workflow is way to ensure best practices and bake compliance into your processes.

Transition buttons will not be shown on the screen until the required conditions have been met. Be sure your conditions are documented, so users understand what needs to happen in order to transition the issue. 

 Validators

Validators check for certain data before a transition occurs.  They are similar to conditions in that they both allow you to build your business rules into your Jira workflow. The difference between conditions and validators is subtle, but important. Whereas an unmet conditions will mean that transition buttons are not shown, validators check the input after the transition button has been clicked, but before the transition has been performed.  This means you can even set validators on input that is gathered from users on the transition screen. Validators typically check for certain pieces of data. They may check that a field has been updated or that a date falls within a prescribed range. 

Jira workflow Transition Buttons

Transition buttons will not show if a conditions has not been met. Validations are checked after the transition button is clicked.

Post Functions

Post functions are automated actions that take place immediately after a successful transition has occurred.  Post functions can be used for things like updating or clearing a field, or reassigning an issue. Note that Jira automatically adds five post functions to each transition. Most of the time, you won’t need to mess with these. However, you might want to alter the last one Fire a generic event… depending on where the transition is in your workflow. For example, you could change the generic event to an Issue Resolved event if you’ve just reached the final status in your workflow. (This is a good practice for dealing with the confusion that can arise between Closed and Resolved issues). It’s also important to remember that post functions are executed in the order they are listed.

 

How to Set a Transition Behavior

As always, if you’re monkeying with an existing workflow, create an inactive copy and make your changes there. Then apply the workflow to the desired projects.

Adding a behavior to a workflow is fairly straight forward. Select the transitions where you want to add the behavior.  You’ll get a pop-up that shows an overview of the transition including all of its properties and behaviors.

 

 Jira Workflow transition behaviors

 

Click into any of the behaviors (for example, conditions) and a new screen will open that shows all existing conditions, as well as an Add button. Click the Add button and you’ll be given options for the behavior you want to create.