Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update Target Start / End based on Sprint Dates

Louise Woods August 14, 2025

Hi, 

I am wanting to populate / update the Target Start & End Date on an Epic based on the stories / spikes / bugs based on the sprint dates earliest and latest date. 


So in the automation I can look up all tasks within the Epic and as starting point was adding it to the audit log to check it worked but the date is blank. 

Screenshot 2025-08-14 135031.png

Any advise or steps - please explain to me like I don't work in IT :-)

Thanks, 

Lou 

 

 

2 answers

1 vote
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.
August 14, 2025

Hi @Louise Woods 

The Lookup Work Items action returns a list of work items, and the Sprint field is also a list, leading to a nested list-of-lists.  When you want to use a function such as max on the endDate, the nested lists need to be flattened into a single list first:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.flatten--

For example:

{{lookupIssues.sprint.endDate.flatten.max}}

Another way to do this is with nested iteration, storing the result in a created variable as text, and then splitting again before using max.  That is needed for filtering cases, but not for your scenario.

 

Kind regards,
Bill

0 votes
Mikael Sandberg
Community Champion
August 14, 2025

Hi @Louise Woods,

In you automation do you have a lookup work item component? The smart value {{lookupIssues}} only works if you do a lookup work items first. 

Louise Woods August 14, 2025

Hi @Mikael Sandberg , 

Yes I do:

Screenshot 2025-08-14 145946.png

Mikael Sandberg
Community Champion
August 14, 2025

You have to merge the returned work items in order to get the date that is furtherest out. Have a look at this answer to a similar question. To do the merge you create a variable with the list of dates like this:

name: allEndDates

value: {{#lookupIssues}}{{#sprint}}{{endDate.jiraDate}},{{/}}{{/}

And then you can use this to get the max date:

{{allEndDates.substringBeforeLast(",").split(",").toDate.max}}

Suggest an answer

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

Atlassian Community Events