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

Roman Kastner 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

2 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 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.

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!

TAGS
AUG Leaders

Atlassian Community Events