Start and finish date of an epic with the max date of the tasks related

Angelica Hernandez March 31, 2021

Hello,

For a project I want to set the start and finish date of each epic considering the max date of the tasks related. 

I really appreciate ideas to set a rule.

 

Regards

1 answer

1 accepted

1 vote
Answer accepted
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.
March 31, 2021

Hi @Angelica Hernandez 

Are you asking how to do this with Automation for Jira rules?  If so...

I can think of a simple way to do this which does not handle all possible scenarios, and a more complicated way: The simple way assumes Start Dates only get earlier for tasks, not later, and that Due Dates only get later, not earlier.

With the simple way, you use one automation rule.  In my example below, I assume you mean Due Date as I do not see a Finish Date field in my Jira instance.  If you have a Finish Date field in your Jira instance, please substitute that field name.

  • Trigger: field value change for either Start Date or Due Date by an Edit operation
  • Condition: issue type is not epic
  • Branch: on epic (parent)
    • Advanced Compare Condition: {{triggerIssue.Start Date}} is not empty
    • Advanced Compare Condition: {{triggerIssue.Start Date}} is less than {{issue.Start Date}} (the epic)
    • Action: edit Start Date to the {{triggerIssue.Start Date}}
  • Branch: on epic (parent)
    • Advanced Compare Condition: {{triggerIssue.duedate}} is not empty
    • Advanced Compare Condition: {{triggerIssue.duedate}} is greater than {{issue.duedate}} (the epic)
    • Action: edit DueDate to the {{triggerIssue.duedate}}

The more complicated way uses two rules and can handle the dates changing in either direction, earlier or later.  Please let me know if you want me to post that information.

Best regards,

Bill

Angelica Hernandez April 5, 2021

@Bill Sheboy , thank you so much! is Exactly what I needed.

Thank you for your complete responde, very useful 

Like Bill Sheboy likes this
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.
April 5, 2021

I am glad to hear that helped you.  Please consider marking this question as answered; that will help others in the community find solutions faster.  Thanks!

Omer Agami February 7, 2022

Hi @Bill Sheboy 

How would you adjust that to the complicated solution that handle changing to earlier and later?

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 7, 2022

Hi @Omer Agami 

Since this question was posted in April 2021, Atlassian has improved the Lookup Issues action to include all fields.  It is now much easier to find the min/max and update the parent epic, and eliminate any edge cases.  Here is an example for start date:

  • trigger: start date changes for an issue
  • condition: issue is a child of an epic
  • action: lookup issues with JQL to find all sibling issues with the same parent
  • branch: on the parent
    • action: edit the parent's start date to {{lookupIssues.Start date.min}}

Kind regards,
Bill

Omer Agami February 8, 2022

Hi @Bill Sheboy 

Thanks a lot for the idea, I understand the logic of the flow. 

I wanted to ask if I have a few epics in a version (and of course I want every epic to be presented with its dates), I didn't understand how to generate the action section, how to refer to the proper JQL.

Thanks a lot!

Like Bill Sheboy likes this
David Ashlock February 16, 2022

Hi @Omer Agami , here is what I used:

 

parent = {{triggerIssue.parent}}

Like Omer Agami likes this

Suggest an answer

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

Atlassian Community Events