I have a HR Service Desk project that uses automation rules to create Tasks within the IT Service Desk when a new employee is requested. For example, to procure a new laptop or create a new user account.
I am trying to use automation to transition the parent (HR) issue to Done once all the linked issues are marked as Done. Unfortunately, I simply cannot figure out how to do this.
Within the Automation Library, there is an automation called "When all sub-tasks are done → move parent to done". I have attempted to edit that however I haven't had any luck at all.
Any help is appreciated.
You'll need to create your rule in Global automation which requires Jira Admin permission. Navigate to automation by going to Settings cog / System / Global automation (it's at the bottom of the sidebar).
When you are creating your rule click the rule details (at the top of the rule summary) and update the scope to be multiple projects. You can then select the projects where the rule needs to run (HR Service Desk and IT Service Desk).
Then your rule might look something like this
I had a quick test and it worked for me. If you can add more precise conditions it will ensure your rule only performs actions on the correct issues.
Thanks John! The way the rule is structured makes sense.
However, based on the fact that the rule has to run each time an issue is transitioned to Done just makes it impracticable in my environment. I would reach my limit in no time at all.
Is there no way to add a condition that takes into account the type of issue it is (in my case a Task that relates to the parent) to determine if the rule should run?
Thank you again.
The answer that John provided (Mar 28) was the closest I could get to actually having it work the way I wanted. However, because the rule would need to be run at such a high rate and we would reach our monthly Automation limit in no time, there was no way I could implement it in my environment.
In our current workflow, the parent requests are manually marked as Done when all related Tasks are complete. Actually, I should say that they are supposed to be manually marked as Done... ;)
Oops sorry I've missed a reply here!
The only alternative I can think of is using a schedule trigger instead of issue transitioned. But this would mean the updates don't happen in real time.
This will give you more predictability in your usage and can perform the transitions in bulk at a specified time (e.g. twice a day, at the end of the day, at the end of the week, etc...). You'll just need to make sure you check "run a JQL search and execute actions for each issue in the query".
Here is a reference of how it might look (but you'll need to figure out the JQL that's correct for your situation).
I'm trying to accomplish this as well, where when all linked tasks of a given ticket are closed that I close then I close the ticket. But, when I try the rule suggested above it's really transitioning the linked tasks since the transition node is in the Linked issues branch of the rule. How can I get the transition node to refer to the original ticket? This workflow is being triggered each time a linked issue is transitioned to Done by another rule that updates a field in the issue the newly closed was linked to, and then i put a couple of filters since I only want ticket to be transitioned if it is in the In Progress state. For my testing all issues are in the same project, so I haven't made it global yet.
If you want to share screenshots you can and I can help you move through it. There is also an example of how you can do it here: https://community.atlassian.com/t5/Automation-questions/How-can-I-transition-the-parent-when-all-subtasks-are-resolved/qaq-p/159407
Thank you so much for the offer to help. At this point I've been trying so many different things that I have no idea what will work anymore.
I took the example from the link you provided, but it doesn't seem to do the trick. I'm sure I've made some mistake somewhere in the configuration.
Below is a screenshot of the automation as it stands now (not working).
Also is a grab of a sample ticket to give you an idea of what I'm aiming to do:
Once all of the Tasks linked to the Request have been set to "Done" I'd like the Request to be transitioned to "Done" as well.
I also have the similar requirement that when all the linked issues are resolved the parent issue should be resolved.
I tired what you suggested but the problem is it is not checking for all the linked issues even if one of the linked issue is resolved the automation rule triggers and resolves the parent issue.
Could you please let me know how to check for all the linked issues and not just the one ?
pfa image for my automation rule.