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.