I set up two automations to close the parent issue when the child issues are closed. One automation closes the parent issue when all child issues are closed. The second automation closes the parent issue when all the sub-tasks are closed.
Is a sub-task covered by the first automation (child issues)? I noticed that in a story with sub-tasks, both automations ran.
Hi @Jimmy Yu -- Welcome to the Atlassian Community!
That depends upon how your rules are written...
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Subtasks are part of their parent issue, although in some things (such as some rule actions) they behave like a stand-alone issue.
If your rule is just using the the parent field, it may be possible to do this with one rule. The challenge may be if you want the behavior to cascade, as the rule may need to trigger itself. For example:
Kind regards,
Bill
Thanks @Bill Sheboy
Attached are the rules & audit logs. The parent/child automation completed successfully, but the parent/sub-tasks one had some errors - presumably because the automation triggered, but the parent was already in done state from the prior automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because you have two different rules, with the same trigger and no conditions on issue type, they are eventually colliding. Regarding that Resolution error, I recommend checking the workflow for any sets of resolution.
Back to your original question: if you want two rules, I recommend adding a condition immediately after the trigger in each rule to check the issue types. That will limit which issues proceed through the processing.
And as I noted earlier, the challenge can be with a cascade of changing to done / closed for multiple issue type levels. If you want to handle that, the first rule "When all child issues are completed..." will need to enable the "Allow Rule Trigger" option. That is disabled by default to prevent unintended problems.
That option will allow changes made by the subtask rule (to their parent) to trigger the other rule. Please note well: before doing that, fully test your rules to prevent run-away rule looping errors.
Aside: because of the potential risk of manual errors, I recommend having rules to move parents from "not started" to "in progress" when children start work, but not to have rules to move the parents to "done" for the opposite cases. Then team members can deliberately confirm there is no remaining work before they move a parent issue to "done".
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.