Can Jira workflow 'All' transitions be restricted for certain resolutions or statuses natively?

Matt
Contributor
June 1, 2018

Currently I have an 'All' transition to a status which allows all statuses to transition to it. However, I would like to restrict one or more statuses from being able to use this 'All' transition.

The statuses that I wish to restrict have the issue resolution set to 'Done'.

Preferably this would be possible in native Jira without the use of add-ons.

 

Thanks.

2 answers

1 vote
Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2018

Hi Matthew,

'All' or 'Global' transitions can have the same conditions, validators and post functions like any other regular transition. So in your case you have set up a condition which would only allow this transition to be triggered if issue's resolution is set to 'Done'. More info on workflow transition conditions is in this documentation.

Matt
Contributor
June 1, 2018

Hi Ivan, Thanks for the quick reply.

From what I understand of the native conditions available for workflow transitions, they do not allow for a condition to be set so that only certain resolutions are deemed to be eligible for transition.

Which native condition would this be? As they all seem to be oriented towards restricting certain users, roles, or groups of users and not the issue status or resolution.

Thanks,

Matt

Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2018

Indeed, the list of conditions which is available out of the box is rather limited and does not really allow much flexibility.  

Fortunately however, many 3rd party plugins add many different validators, conditions and post functions. I would recommend JMWE for starters. It has a ton of built-in conditions and also allow you to write your own using Groovy scripts, if you feel like it.

Matt
Contributor
June 1, 2018

Thanks for the heads up regarding JMWE. It's a shame Jira does not allow this natively.

I have found that Scriptrunner also allows for the creation of custom conditions, and can be created based on JQL, such as Status != 'Unwanted status' etc.

Ivan Tovbin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2018

Scriptrunner allows you to write custom scripted conditions, which gives you a MASSIVE flexibility in choosing your options, so if you happen to have it, then it can easily solve your issue. If you need help with writing a script for your custom transition then do let me know, I might be able to assist.

0 votes
Goran Dermeta November 7, 2019

Hi all,

I am having a similar issue, but only JMWE, no scriptrunner.

Is it possible to use Groovy to create one condition which allows only a specific project role to transition to Reopen?

 

Currently Reopen transition is global, and only assignee can use it. But I would like to limit use of this transition when resolution is set for a task, so that only project admin could reopen from statuses Resolved and Closed.

Can this be done with Groovy, and how to do it?

Goran Dermeta November 7, 2019

It seems this Groovy solves my needs:

issue.getAsString("resolution") != ""
currentUser.isInProjectRole("Administrators", issue.get("project"))

Suggest an answer

Log in or Sign up to answer