The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to prevent transition unless sub-task exists

Kevin Stark
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2013

Is there any way to prevent a transition unless the issue has at least 1 subtask? I'm trying to prevent users from transitioning user stories through the story workflow until at least 1 subtask has been created.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Henning Tietgens
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 Champions.
April 9, 2013

You could use the Script Runner plugin with a simple scripted condition:

issue.subTaskObjects?.size()>0

Henning

JamieA
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 Champions.
April 9, 2013

Or just:

issue.subTaskObjects

Henning Tietgens
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 Champions.
April 10, 2013

Ok :-) I was not sure if the API maybe returns an empty collection...

0 votes
Chaithra N
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 Champions.
April 9, 2013

If you want to a prevent particular transition (i.e Tranistion must not be availble to end User), then you will have to write Custom Condition for this and in Condition Class you can check if Subtask is available or not.

TAGS
AUG Leaders

Atlassian Community Events