Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set Epic Start and Due Date to earliest/latest Child Dates

Roman Kastner
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!
May 8, 2023

Hi,

I want to have an automation to do the following:

The type of trigger does not really matter (manually or field value change is possible), but it should be executed on an Epic.

The automation should get the earliest Start Date of all child Issues under an Epic.

Then the Epics Start Date should be updated with this earliest Start Date.

Analogously I will need the functionality for the Due Date.

 

A screenshot and possible queries would be much appreciated!

Thanks in advance

3 comments

Comment

Log in or Sign up to comment
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2023

Hello @Roman Kastner 

Welcome to the Atlassian community.

You could use the Field Value Changed trigger to monitor the Start Date and Due Date fields for changes.

You would follow that with an Issue Field Condition to confirm that the issue is not an Epic or a subtask.

You would follow that with a For Branch / Related Issues / Epic (parent) step

Within the branch you could use the Lookup Issues action to retrieve all the child issues of that Epic via JQL where the field you monitored in the Trigger (Start Date, or Due Date) is not empty, and order the results by that field so that the first issue listed would have the date you want to copy to the Epic. 

i.e.: "Epic Link" = {{issue.key}} and "Start Date" is not empty ORDER by "Start Date" asc

You would add an Advanced Compare Condition to confirm that there was at least 1 issue in the result set.

- First Value: {{lookupIssues.size}}

- Condition: greater than

- Second value: 0

The next step would be to update the Epic's Start Date field with the Start Date value from the first issue in the results set using the Edit Issue action.

- Field to update: Start Date

- Value: {{lookupIssues.first.Start Date}}

 

Repeat the Lookup Issues, Advanced Compare, and Edit Issue actions for the Due Date field.

Screen Shot 2023-05-09 at 4.27.57 PM.png

Like # people like this
Roman Kastner
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!
May 10, 2023

Hello Trudy,

thank you so much, it works.

 

Best regards,

Roman

Like # people like this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

You're welcome.

In the future, you may want to post questions in the Questions board rather than the Discussion board.

Like Roman Kastner likes this
Johnny Hermann August 31, 2023

Consider other triggers that affect membership as a child of the Epic, including Epic Link changes, and creation of issues directly as a child of an Epic.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 31, 2023

Good point, @Johnny Hermann 

I have constructed other rules that detect a change in the parent epic of an issue and then execute some "recalculation" actions against both the original parent Epic and the new parent Epic.

If a child issue is removed from its Epic, the Start and Due dates on that Epic may need to be reset.

If a child issue is added to an Epic, the Start and Due dates on that Epic may need to be reset.

Like # people like this
RXAVIER September 11, 2023

Hello @Trudy Claspill can you explain how did you execute this "resets" in terms of automated functions in jira?

Thank you 

Like justen_dawson likes this
C S Seshagiri November 14, 2023

Hi @Trudy Claspill  Thanks for the automation.  We need to a similar kind of automation, we need to print earliest planned dates among all subtasks on story level when story transitioned to a particular status.  

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 14, 2023

Hello @C S Seshagiri 

Welcome to the Atlassian community.

If you have a question about automation I suggest that you post it in the Questions area so that more people will see it.

https://community.atlassian.com/t5/Jira-questions/qa-p/jira-questions

The only people who see new post on existing topics are the people that watch the topic.

Additionally when asking about automation rules it is important that you post a copy of the rule you have tried to construct and provide details of how it is not operating in the way you want.

If this Discussion thread is relevant to your question, include a link to it when you post your Question.

Kelvin Lee
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!
May 2, 2024

Thanks @Trudy Claspill  !! To add on, i bumped into frustration when dealing with the Due Date field if i syntax reference it as "Due date" (with a space) . I found out it is probably an internal Jira engine problem in referencing to the Due date field. When coding it in automation , what worked is  "Duedate" (Without the space!)

 

The JQL for Lookup Issues : 

"Epic Link" = {{issue.key}} and "Duedate" is not empty ORDER by "Duedate" asc

 

The JQL for Edit issue fields for for Due date : 

{{lookupIssues.last.Duedate}}

Screenshot 2024-05-03 at 2.50.51 PM.png

RXAVIER September 11, 2023

Hello Guys,

First of all thank you for sharing all this options. 

Even though I'm struggling to use this automation for the field "Target End" from advanced roadmaps.

I'm using the input by JSON following this:  "fields": {
"customfield_13603" but I receive the feedback that this is an unknown custom field.

Can you help me out to find which expression should I use for JSON regarding the "Target End"?

Thanks in advance

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 11, 2023

@RXAVIER 

Welcome to the Atlassian community.

Please post you request for assistance in on of the Questions boards, such as this one.

https://community.atlassian.com/t5/Jira-questions/qa-p/jira-questions

Describe your scenario and provide images of the rule you have created. Show the output in the Audit Log. If you are using JSON to edit fields then show the details of those steps.

If this Discussion post is relevant to your question, add a link to it in your post.

RXAVIER September 14, 2023

Thank you @Trudy Claspill , already did it here!

Erich Heerdt November 21, 2024

This is very helpful! However, wouldn't you want to change Due Date to sort DESC so it grabs the highest value, or alternatively use the last item in the lookup.Issues?

(I changed mine to DESC (just for dueDate) and it works perfectly. Thanks to everyone helping out with this questions its very useful!)

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2024

Yes, if you want the latest Due Date you would need to either sort the Lookup Issues results on Due Date DESC and get the first item in the results or if you used ASC you would need to get the last item in the list rather than the first.

TAGS
AUG Leaders

Atlassian Community Events