Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation: Inherit value from Epic (Parent) to its children AND sub-tasks of its children

Kate Tokar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2024

Is there a way to set up Jira Automation so that upon filed value change in Epic, it copies not only to its children but also to the sub-tasks of its children?

1 answer

0 votes
Trudy Claspill
Community Champion
February 2, 2024

Hello @Kate Tokar 

I'm not sure if it can be done in a single rule, but you could accomplish it with two rules; one for copying the data from Epic to child issues, and one for copying the date from child issues to their subtasks.

I'm still trying to work out if it can be done in one rule.

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.
February 2, 2024

Hi @Kate Tokar and @Trudy Claspill 

I believe it can be done in one rule...

For company-managed projects, JQL using the parentEpic() function can be used to find the issues: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#parentEpic--

For an example query, assuming the parent is the trigger issue:

parentEpic = {{triggerIssue.key}}
AND key != {{triggerIssue.key}}
ORDER BY Key ASC

 

For team-managed projects, the parentEpic() function does not work.  Instead the keys must be gathered for the child issues and subtasks.

  • use lookup issues with JQL to gather all of the child issues of the Epic (again assuming the trigger issue is the Epic)
parent = {{triggerIssue.key}}
  • using iterators, get the child keys and their subtask keys (from the subtasks attribute), into a single CSV list
{{#lookupIssues}}{{key}}{{#subtasks}}, {{key}}{{/}}{{^last}}, {{/}}{{/}}
  • using a JQL branch, the values may be iterated over to make the updates
key IN ( {{#lookupIssues}}{{key}}{{#subtasks}}, {{key}}{{/}}{{^last}}, {{/}}{{/}} ) 

This will have the rule limit of 100 issues for the lookup, and could run into service limits if there are many subtasks for many children of the epic: https://support.atlassian.com/cloud-automation/docs/automation-service-limits/

Please let me know if you want additional details on this one.

Kind regards,
Bill

Like # people like this
Trudy Claspill
Community Champion
February 2, 2024

@Bill Sheboy 

You need to start creating separate Answers when you chime in so that we can reward you for your brilliance! :-D

Suggest an answer

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

Atlassian Community Events