How do i transition a ticket when all child tickets are done?
Asked by Scott Federman:

I have a standard issue type of "LO comp agreement change request" which is the parent of the issue type "LO comp request task". They are linked using the parent link field from the roadmaps app, not the standard default jira linking functionality. What am i doing wrong here. I want the parent issue to close automatically when all child issues are marked and done or not applicable.

![Capture1.JPG](/t5/image/serverpage/image-id/186082iCE5540438F05C46E/image-size/large?v=v2&px=999 "Capture1.JPG")


Answers:
author: Curt Holley
body: In line with what [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) has suggested, I did a similar trick using a variable to get the (upper level) Parent key to use in a JQL branch. Thus guaranteeing a single result every time (in the JQL based branch) See below. *In my case i was updating the Safe Epic issue type based on a Feature (formally known as Epic) moving into "In Progress".*

For the record,*I believe the "Parent" branch only talks on Sub-task to Standard issue type level. This may change n the coming months as these changes continue to roll out:*

*[Rename 'epics' in your company-managed projects (atlassian.com)](https://community.atlassian.com/t5/Jira-articles/Rename-epics-in-your-company-managed-projects/ba-p/1874726)*

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


author: Bill Sheboy
body: Hi [@Scott Federman](/t5/user/viewprofilepage/user-id/4727072)

Would you please post an image of the audit log details, showing what happens when the rule executes? That may help explain what is happening. Thanks!

Kind regards,  
Bill

comments: author: Scott Federman
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) yes of course. It says no links because i used the parent link field. ![audit log.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/186085iC1E3BD9F337BC3E2/image-size/large?v=v2&px=999 "audit log.JPG")


author: Bill Sheboy
body: Hmmm...if that branch type does not work due to the linking, please try a branch on JQL to get at the parent. You can test that JQL first with advanced search and once you have what you want, use it in the branch.

And...you do not show the details of your second "JQL issues match" condition to check for remaining items as "done" or "not applicable". Please review that to ensure it does what you expect...and if not, instead consider using Lookup Issues and check the size to confirm there are no remaining child issues.


author: Scott Federman
body: So it turns out that i had a post function that was blocking the automation. Silly rookie move i didnt notice.


author: Scott Federman
body: [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993) [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

I am able to get it to transition the parent with this automation when one child ticket closes but i cant seem to get it to hold off until all are closed.

![2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/186131iEDAEB2ADC016AB02/image-size/large?v=v2&px=999 "2.JPG")

comments: author: Bill Sheboy
body: Correct; that is why I suggested replacing your second JQL condition with a Lookup Issues action with JQL to check for any sibling issues (same parent) and which are not done/completed.

Then use an advanced compare condition and only proceed if the following value is zero: {{lookupIssues.size}0}}


author: Stefan Salzl
body: my vote for [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) 's answer ?


author: Stefan Salzl
body: Hi [@Scott Federman](/t5/user/viewprofilepage/user-id/4727072) ,

Is that by purpose that your JQL (especially the issue types) are the same in your condition for the trigger as well as for your parent branch??

As described in your initial question "LO comp agreement change request" is the parent. As this issue type is not part of the JQL condition in the parent branch it cannot find a match.

Best  
Stefan


Tags: cloud