Forums

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

Can the number of subtasks created in a parent task be limited to 1?

Steve Rothenberg
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!
July 26, 2019

If there is more that 1 subtask on a parent, and if the subtask  updates the parent's state while traversing the subtask workflow, only the oldest substask will update the parent state as it goes through the workflow.  Moving a new subtask through the workflow will not update the parent status, even though that newer subtask is executing all the same transition code.

In my business rules, having only one subtask per parent makes sense and prevents the problem I mentioned above.

Anyone have any thoughts?

Steve

1 answer

1 accepted

0 votes
Answer accepted
Ilya Turov
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.
July 27, 2019

I guess a validator on creation like this (scriptrunner example):

issue.parentObject?.subTaskObjects.size() == 0

would allow you to create a subtask only if it's the first one for the parent issue

if you dont have a scriptrunner try looking at options for validators you have, maybe there's something else to make this check

Steve Rothenberg
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!
August 12, 2019

Thanks for your input on my question, Ilya - I've found it helpful to me!

Suggest an answer

Log in or Sign up to answer