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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Jesper Fransson and welcome to the community,
Normally on Cloud you should just be able to create a condition on the transition itself.
By setting a condition, the transition will not be shown unless the condition is fulfilled. Going by what you have as a requirement I would suggest using a "Sub-Task Blocking" Condition
This allows you to select the statusses the subtasks need to be in before the transition becomes available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dirk,
Thanks for you response.
I'm already using the blocking condition for when all the Sub-tasks are done on Transition 1, and it works fine. The problem is the "ALL" condition.
I cannot add "a one or several" condition for the sub-tasks, hence I cannot hide Transition 2 when all sub-tasks are done.
I hope that made sense.
Best regards,
Jesper
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.