Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner Condition for Jira Cloud - Only show transition if one or more sub-tasks are open

Jesper Fransson
Contributor
November 21, 2021

I have a workflow with two transitions going from In Review -> Closed. We can call them Transition 1 and Transition 2.

Only one of these transitions should be available at all times.

The condition logic should be as follow:
When you transition a parent issue with multiple sub-task which are ALL closed - Transition 1 should only be available. This is doable and works with the native built in condition:
All sub-tasks must have one of the following statuses to allow parent issue transitions: DONE 

If however there is still one or more sub-tasks OPEN (not closed) when transitioning the parent issue, only Transition 2 should be available. 

Some pseudo code to illustrate what I would like to do: 

if (all sub-tasks has status = closed){
show.transition.name = "transition 1"
}
else (one or more sub-tasks has status != closed){
show.transition.name = "transition 2"
}

Is it possible to add some kind of scriptrunner condition (jira expression) for this? Or is there any other solution suitable for my need.

Thanks.

1 answer

1 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
November 22, 2021

I don't think ScriptRunner can do this on Cloud, but to me Jira Misc Workflow Extensions seems to be your first option to try.

Jesper Fransson
Contributor
November 25, 2021

Thanks for the recommendations, I'll try it out.

Suggest an answer

Log in or Sign up to answer