JIRA Automation to Transition Parent when all Children are Done Does NOT Work

Aslam Mohammed November 25, 2024

We have a requirement to transition the Parent Issue (Epic) to the next status "Ready" once all the child tickets (Task) are transitioned to "Done".

 

I have set-up the automation following the template "When all sub-tasks are done → move parent to done"

The "Related issues" condition based on JQL is also working and returning all the child issues meeting the condition.

However, the automation gives an error saying "The following issue did not match the condition" followed by the parent-id which we would like to transition.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2024

Hi @Aslam Mohammed 

For a question like this, context is important for the community to help.  Please post the following:

* what type of project is this (e.g., company-managed, team-managed, etc.), 
* 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, and
* explain what is not working as expected, and why you believe that to be the case.

Until we see that information...

Are all of the issues (Epic and child issues) in the same project?

 

Kind regards,
Bill

Aslam Mohammed November 25, 2024

Hi Billy,

I'll add additional information as requested.

The project is "Company Managed" and both the issues are in the same project.

Screenshots attached with the Automation and Audit logsScreenshot 2024-11-25 160037.pngScreenshot 2024-11-25 181359.png

As per the Automation, the expectation would be for it to work as below.

1) Trigger 

Once a Issue is transitions to "Done"

2) If the issue type is "Task" and then validate custom fields "Task Type" and "Approve or reject".

3) Check the parent issue of the Trigger

4) If the Parent status is not "Ready for Updates"

5) Check the related issues (Children) of the parent issue under the branch as per the JQL

6) Transition the Parent issue to "Ready for updates".

 

This is based on a Template (see attached).

Screenshot 2024-11-25 175111.png

 

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2024

Would you please repost the audit log details for the rule?

The image you show is not for the rule as the audit log shows a call to the Re-fetch Issue action and that is not in your rule.

 

Also please post an image of the Related Issues condition you are using.

Aslam Mohammed November 25, 2024

I've uploaded the correct screenshot of the Automation which has the "re-fetch issue data"

Here's the JQL used: issuetype = Task AND "Task Type[Dropdown]" = "Approval" AND "Approve Or Reject[Dropdown]" = "Approved" AND status = Done

Here's the validation result of the JQL, which shows correct results.

Screenshot 2024-11-25 181713.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2024

Thanks for that information!

 

What is the purpose of the Re-fetch Issues action in your rule, as I do not believe it is needed for this scenario?

 

Next, have you tried that JQL standalone (for example, adding AND parent=COA-149) to confirm the results match what you expect?

If they do, perhaps try another approach, as I have observed the Related Issues condition not working as expected for options like "Children".  (We really do not know what the automation is adding to the JQL behind the scenes as that is undocumented.)

For example: use a Related Issues condition with JQL to fully control the expression, and invert the test

  • Related issues: JQL issues
  • Related issues JQL:
parent = {{issue.key}}
AND issuetype = Task
AND "Task Type[Dropdown]" = "Approval"
AND "Approve Or Reject[Dropdown]" = "Approved"
AND status != Done
  • Condition: are not present

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events