How to update parent issue based on start date and due date from child issues?

wiwan January 26, 2025

Under my epic, I have parent tasks and sub-tasks within them.

I want a rule that every time I change or enter the start and end task to my child tasks, the parent task will update to the max and min start and end dates of the first and last child task within the parent task. I currently do not have any times entered except the child tasks.

 

I tried using this link but it didnt seem to work:

https://support.atlassian.com/automation/kb/how-to-update-parent-issue-start-date-and-due-date-from-child-issues/

2 answers

1 accepted

3 votes
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.
January 26, 2025

Hi @wiwan -- Welcome to the Atlassian Community!

First things first: I estimate this question / scenario is asked about 2-3 times per week in the community, with many responses over the years.  And that article you note covers a very narrow scenario to update a parent issue for changes to a child issue.  It does not cover all possible cases (or even the edge cases in the article).  For example, the article covers one pair of parent-child relationships, and not two as you describe: Epic-to-Task, and Task-to-Subtask.

If your rule does not work, it may not match the scenario, or if it does match, the rule may not have been implemented to match the article.

 

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

  • please clarify your scenario and how if aligns / differs from that article,
  • what type of project is this (e.g., company-managed, team-managed, etc.),
  • an image of your complete automation rule in one single image,
  • images of any relevant actions / conditions / branches,
  • an image of the audit log details showing the rule execution (expanding all the details), and
  • explain what is not working as expected and why you believe that to be the case.

 

Kind regards,
Bill

wiwan January 26, 2025
  • please clarify your scenario and how if aligns / differs from that article, I feel like what the article summary describes is exactly what I am looking to achieve. I have a handful of epics -> within my epics, I have a handful of parent tasks -> within my parent tasks, I have a handful of child tasks. The start date for the first child task needs to be the start date for the the parent task, and the due date for the last child task needs to be the due date for the parent task.


  • what type of project is this (e.g., company-managed, team-managed, etc.), this is a business project, team managed.

  • an image of your complete automation rule in one single image,
  • images of any relevant actions / conditions / branches,
  • an image of the audit log details showing the rule execution (expanding all the details), and
  • explain what is not working as expected and why you believe that to be the case. im not sure what the issue within the edit issue fields is but the parent tasks do not seem to be changed by this rule.
  • image.pngimage.pngimage.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.
January 26, 2025

Thanks for the additional information, and please review the article again as it does not match your scenario

 

What that article does is:

GIVEN there are Epics with child issues (e.g., Story, Task, or Bug)
WHEN a schedule occurs (e.g., once per week)
THEN for each Epic, update the Epic's Start Date to the minimum value for the child issues' Start Date
AND update the Epic's Due Date to the maximum value for the child issues' Due Date

 

Instead, you want to:

  • update one single Epic when its child issue's fields change
  • update one single Story, Task, or Bug when its child Subtasks' fields change

And so the branch JQL from that article will not work for your scenario as it gathers all the Epics, and then updates all of them.

 

Some other problems with the rule image you posted are:

  1. The smart values used in your rule are incorrect for the fields, leading them to be set to null (empty)
  2. Please look closely at your Edit Issue action: the Due Date field is listed twice.  That means someone incorrectly added a second field, and that will certainly cause project and rule problems.  Please work with your project admin (and possibly the Jira Site Admin) to correct that error by deleting the extra field and only use the system field in the rule.

 

It is possible to solve your scenario with a single rule by limiting it to specific issue types and allowing the rule to trigger itself (by detecting field changes).  For example:

  • trigger: field value changed for Start Date or Due Date
  • condition: issue type is Story, Task, Bug, or Subtask
  • branch: to parent
    • action: lookup issues with JQL to get the other child issues of the parent
      • parent = {{issue.key}}
    • smart value condition: As a precaution, confirm the lookup found issues.
      • first value: {{lookupIssues.size}}
      • condition: greater than
      • second value: 0
    • action: edit issue, setting the fields
      • Start Date to {{lookupIssues.Start date.min}}
      • Due Date to {{lookupIssues.duedate.max}}

In the rule details at the top, enable this option:

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

With that option, the rule can detect if a Subtask's fields are changed, and then update its parent Story (or Task or Bug).  After that update happens, the rule will trigger again and update the Epic.

 

Earlier I noted edge cases for this scenario.  The above rule will make updates when the fields change in the child issues (at both levels).  It will not handle these edge cases (as the rule will not trigger / handle them):

  • a person manually changes the Start Date or Due Date field in an Epic, overriding the automatically set values
  • a new issue is created with a parent Epic
  • an issue is deleted from Jira which has a parent
  • an issue changes from one parent Epic to a different one
  • Atlassian has an automation outage and rules do not run when expected
  • etc.

 

wiwan January 26, 2025

thanks @Bill Sheboy it appears this works, just need to sort smart values as you mentioned. The error I kept getting was having multiple Start Dates for some reason. Thanks again!

Like Bill Sheboy likes this
0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2025

Hi @wiwan 

I don't know what went wrong with given link but I listed what I'd do for your case:

- add a trigger "Field value changed" and select the fields: Start date and Due date

- add an action: Branch and Choose "Parent"

- add an action to update the parent task's dates: 

-- Start date: the smart value to find the earliest start date of all child tasks

{{issue.subtasks.startDate.min}}

-- Due date: the smart value to find the latest end date of all child tasks

{{issue.subtasks.dueDate.max}}

I hope this helps

 

Suggest an answer

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

Atlassian Community Events