Workflow transitions, by default, are accessible to anyone who has access to the issue. There will be times when you would want to restrict access to certain transitions. For example, you might want to restrict access to the Move to Backlog transition for the following reasons:
To restrict the availability of a workflow transition, we can use workflow conditions.
For this recipe, we need to have the JIRA Suite Utilities add-on installed. You can download it from the following link or install it directly from the Universal Plugin Manager:
https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities
We need to create a new custom field configuration scheme in order to set up a new set of select list options:
Refer to the following screenshot:
After you have applied the workflow conditions, the transition Move to Backlog will no longer be available if the issue is already in the Backlog status and/or the current user is not in the Developer project role.
Using the Value Field condition (that comes with the JIRA Suite Utilities add-on) is one of the many ways in which we can restrict the availability of a transition based on the issue's previous status. There is another add-on called JIRA Misc Workflow Extensions, which comes with a Previous Status condition for this very use case. You can download it from https://marketplace.atlassian.com/plugins/com.innovalog.jmwe.jira-misc-workflow-extensions.
When you have more than one workflow condition applied to the transition, as in our example, the default behavior is that all conditions must pass for the transition to be available.
You can change this so that only one condition needs to pass for the transition to be available by changing the condition group logic from All of the following conditions to Any of the following conditions, as shown in the following screenshot: