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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,552,266
Community Members
 
Community Events
184
Community Groups

How to automatically adjust a task's target end date to the latest of its subtasks?

I need an automation that helps me set the Target end (customfield_12302) to the date of it's latest Sub-Task Target end.

 

Can someone help me please? I tried the following code, but it doesn't work:

{
  "fields": {
    "customfield_12302": "{{#issue.subtasks.max.Target end}}{{.}}{{/}}"
  }
}

1 answer

1 accepted

2 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 20, 2023

Hi @Marleen Willing 

As far as I read it in the documentation there is no need to iterate over the list. The "max" method is available directly to the list (see link):
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.max

Try to add the following for customfield_12302 in your JSON:

{{issue.subtasks.Target end.max}}

 

Best
Stefan

Hi @Stefan Salzl

thank you for your quick response. Do you have an idea why the automation still does not work? Now it says: (Unparseable date: "" (customfield_12302))

It doesn't matter whether I use customfield_12302 or Target End. Both doesn't work.

2023-04-20 17_16_13-Desktop-Win2019 - Desktop Viewer.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

Hi @Marleen Willing ,

is there any special date format configured in you site? Could you try to output the format in a log action? this will write the date to the audit log so we can see the format. Just fill in any date into the parent‘s date field and write the cuustom field to audit log with a log action using {{issue.<your_customfield>}}

furthermore: Is there any special reason you are using the json edit type? Could you also try to choose the custom field from the fields dropdown and write the smart value used in your json into the field?

Best
Stefan

Like Marleen likes this

Hi @Stefan Salzl ,

thank you very much for your help. It worked! The problem was the different date formats.

Best regards

Marleen

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 28, 2023

Hi @Marleen Willing #

That´s awesome. Happy to know you got that working. Thanks for the feedback.

 

Best
Stefan

Suggest an answer

Log in or Sign up to answer