how do I use conditions/validation in subtask to restrict transition based on status of parent ticket

Amir Vegdani January 14, 2015

how can I use conditions/validation in subtask to restrict transition based on status of parent ticket.

for e.g. until the parent ticket arrives in Testing status, the Testing subtask ticket should not be transitioned ahead.

2 answers

1 accepted

0 votes
Answer accepted
Udo Brand
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.
January 14, 2015

Maybe this post can help you:

https://answers.atlassian.com/questions/293936

Amir Vegdani January 14, 2015

Hi Udo, Thanks for quick revert on this. I have gone through that post and tried as well, but it still doesn't work for some reason.

Udo Brand
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.
January 14, 2015

Can you give us more details, what exactly is not working?

Amir Vegdani January 14, 2015

I am using below script in the conditions of build subtask to restrict further transition, if the parent ticket is not in Build Status ! issue.isSubTask() || issue.parentObject.statusObject.name == "Build"

Udo Brand
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.
January 14, 2015

hmm, I'm not a groovy expert but, since this is a condition for a transition of a subtask the part "!issue.isSubTask()" seems wrong. Remove the "!" or the complete expression.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
January 15, 2015

You can use a Conditioned validator. Condition allowing the transition only when the parant status is what you want.

Suggest an answer

Log in or Sign up to answer