Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,256,595
Community Members
 
Community Events
164
Community Groups

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

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

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

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

Thank you for your complete responde, very useful 

Like Bill Sheboy likes this

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!

Hi @Bill Sheboy 

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

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

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

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you