Here's a challenge for you.
Let's say you have a parent issue with X amount of sub-tasks. The order of the sub-tasks may vary.
When sub-task 1 is completed, you want to transition sub-task 2 to "ready".
Please note that, if you change the order of sub-tasks manually, the following conditional logic does not represent the order in which you have them configured.
{{#issue.subtasks{{index}}. {{key}}{{^last}},{{/}}{{/}}
I'd like to avoid creating custom fields for this. Using labels is fine, so mention in sub-task 1 via a label that sub-task 2 is next, etc.
Hi @Patrick van der Rijst - The easiest way to manage this would be through issue linking. For example Sub-Task 2 is blocked by Sub-Task 1 (you can create a custom link type if you have other use cases for the standard link types). From there, you would use automation like this:
If its the last issue in the chain, there would be no branch and the rule would simply exit.
NOTE - Make sure you are NOT using a link type without inbound/outbound designators (e.g. Relates To) as automation will have no way to detect what is the source/target for the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Patrick van der Rijst
I was thinking, first get all sub-tasks which are not in completed state, then do a min on sub-task ID to get the next in line?
For example:
below gives sub-task IDs which are not "Done" state for example.
{{#subtasks}}{{#if(not(equals(fields.status.name,"Done")))}}{{id}}, {{/}}{{/}}
Then, we can store that in a variable {{myvar}},
make that into a list (by removing the last comma and splitting on comma),
and get the "MIN" of the result to get the ID of the next sub-task
and you can act upon it.
Sorry if this is not the requirement, please clarify.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the order of sub-taks could change, Automation does not reflect that, thanks for your effort though.
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.