Forums

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

How to only show one transition based on sub-tasks status? Jira software cloud

Jesper Fransson
Contributor
October 20, 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.

2 answers

0 votes
John Funk
Community Champion
May 29, 2022

Hey @Jesper Fransson  - Did you ever get this resolved? 

Jesper Fransson
Contributor
June 22, 2022

Hey @John Funk

No I didn't sadly. 

Do you have any solution?

0 votes
Dirk Ronsmans
Community Champion
October 20, 2021

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

 

image.png

This allows you to select the statusses the subtasks need to be in before the transition becomes available.

Jesper Fransson
Contributor
October 21, 2021

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

Jesper Fransson
Contributor
October 29, 2021

Hi @Dirk Ronsmans 

 

Please see my answer if possible. 

 

best regards, 

Jesper

Suggest an answer

Log in or Sign up to answer