Transition epic to done when all linked tasks are marked done
Asked by Collista Lewingdon:

Currently working on Automations for a project and we have a rule that transitions and epic to done when all sub-tasks are done.

![2023-02-16 10_10_08-Automation Playground _ Atlassian.png](https://community.atlassian.com/t5/image/serverpage/image-id/240709i4A64481A2341978A/image-size/large?v=v2&px=999 "2023-02-16 10_10_08-Automation Playground _ Atlassian.png")

But it does not trigger when there are no sub-tasks and only tasks.

![2023-02-16 11_27_07-List - Infinite Campus Upgrade - Jira.png](https://community.atlassian.com/t5/image/serverpage/image-id/240707i67CA3E2246DC8205/image-size/large?v=v2&px=999 "2023-02-16 11_27_07-List - Infinite Campus Upgrade - Jira.png")

There is not an option within the related issues condition to select just tasks. How can I make this work?

![2023-02-16 11_29_32-Infinite Campus Upgrade - Details - Jira.png](https://community.atlassian.com/t5/image/serverpage/image-id/240712iFF237A549170F326/image-size/large?v=v2&px=999 "2023-02-16 11_29_32-Infinite Campus Upgrade - Details - Jira.png")![2023-02-16 11_29_44-Infinite Campus Upgrade - Details - Jira.png](https://community.atlassian.com/t5/image/serverpage/image-id/240711i910C08733B56773F/image-size/large?v=v2&px=999 "2023-02-16 11_29_44-Infinite Campus Upgrade - Details - Jira.png")


Answers:
author: Collista Lewingdon
body: Thank you for the suggestions. I was able to figure it out another way. Here is the rule I used instead and it performed the needed function well.

![Epic Done when Tasks Done.png](https://community.atlassian.com/t5/image/serverpage/image-id/241497iED392C23169E287F/image-size/large?v=v2&px=999 "Epic Done when Tasks Done.png")


author: Curt Holley
body: Hi [@Collista Lewingdon](/t5/user/viewprofilepage/user-id/4760953)   
Epics are not the "Parent" of sub-tasks...Tasks and Stories etc are.

If you want an Epic to close when all Stories (or tasks...whatever) are complete.  
Go to the Automation library and use "When all stories are completed ? then close epic" as the template to get you started.  
If you wanna do the sub-task level as well, use "When all sub-tasks are done ? move parent to done" as the template.

comments: author: Collista Lewingdon
body: As you can tell from my screenshots above, I already have this automation and it does not do what I need. We are not using stories, just tasks connected to epics


author: Curt Holley
body: [@Collista Lewingdon](/t5/user/viewprofilepage/user-id/4760953) No, the one in your screenshot will not work on epics and tasks, as it is the Sub-task based one. Use the "When all stories are completed ? then close epic" template and tweak to work for your issue type(s) and "Done" workflow status(es).


author: James D
body: Hi [@Collista Lewingdon](/t5/user/viewprofilepage/user-id/4760953)

You might be able to use a JQL condition for your second step as in my screenshot here, setting the query to search for Task issuetype and then if you want to add any other conditions.

![JQL_issuetype_Task.png](https://community.atlassian.com/t5/image/serverpage/image-id/240784iDC749BF83313B6DC/image-size/large?v=v2&px=999 "JQL_issuetype_Task.png")