Update date Epic from child issues

Diana Karazlateva June 14, 2022

Hi, I have created a rule to update date Epic from child issues, but how to do it for already set dates - check now the dates and update? I can't manage to make the syntax; this below doesn't work: Capture.JPG

2 answers

0 votes
Edward Quinito September 5, 2023

you can try this automation

 

Trigger : scheduler.

with JQL : project = [project key] AND issuetype != Epic ORDER BY cf[custom field ID for Target End Date] DESC

 

then advanced compare

{{Issues.Target End Date.max}} greater than {{issue.parent.Target End Date}}

 

then create variable for {{Issues.Target End Date.max}} lets say the name is TEST

 

then add branch rule for EPIC (parent)

edit the field you want and set it to smart value {{TEST}} instead of usinng copy from trigger issue

Edward Quinito September 5, 2023

I've tried it and it works for me.

Diana Karazlateva September 5, 2023

ok, can you explain how to create the variable TEST, please

Colter Sherley January 31, 2024

@Edward Quinito what version of Jira are you on? Cloud?

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2022

Hi Diana,

You wouldn't need to use the lookupIssues function. 

Create a Scheduled trigger rule. Add JQL to get your list of issues. 

Then do your advanced compare above.

Next, add your New Action for Edit issue to update the field you want to change. 

Save and Publish all of that. 

Then click the Run Rule Now button for it to run through all of the issues. 

You might want to test first by using a single issue in your JQL - something like key=ABC-123. If that's successful, then modify your JQL to get the first list of issues. 

One it runs successfully and updates all of the issues, you probably want to disable the rule so that it doesn't fire everyday. 

Diana Karazlateva June 14, 2022

Hi John,

The advanced compare is what I can't manage - {{lookupIssues.Target End Date.max}} doesn't work; can you propose syntax that I can use to filter tickets within Epic?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2022

Sorry, yes - just replace the lookupIssues. with issue.

Diana Karazlateva June 15, 2022

It's not working; ({{TriggerIssue.Target End Date}}) is also not working as there is no trigger - I need to execute check for all tickets as they are now.

Also tried {{child.issue.Target End Date.max}} - not working.

Any idea of other syntax?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 15, 2022

Can you share the entire rule? 

Diana Karazlateva June 15, 2022

Yes, sure; schedule is simple - tickets not Done, Cancelled or Rejected, every 2hours and:

1.JPG2.JPG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2022

What is the relationship between the parent and children - is it Epics and children? Or Story and sub-tasks? 

Diana Karazlateva June 16, 2022

There are tickets Story & Task within the Epic

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2022

Try using {{issue.Target End Date.max}} for the top value

and {{issue.parent.Target End Date}} for the second value. 

Diana Karazlateva June 16, 2022

It didn't work; tickets didn't march the rule.

I think even with previous syntax is could work, but due to the fact that there is no trigger as it's a scheduled change, no change will happen:

ex.PNG

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2022

Yeah, that's the issue with Scheduled. You might try doing the scheduled rule, and set a value on the Epic. Then do your trigger based on that field changing on the Epic. Then maybe you could use Trigger Issue. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events