I need to copy max due date from sub tasks to parent

anu_m
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!
June 20, 2024

I am using below automation flow to get max value of due date from subtasks and then copy it to the parent task . But parent task is always getting updated with null value . 

 

 

Due date .png

2 answers

1 accepted

1 vote
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2024

Hi @anu_m 

The variable is only available within the branch.

To find it from within the main rule, you can use Lookup Issues. The Actions should be...

  • Action: Lookup issues
    • JQL - parent = {{triggerissue.key}}
  • Action: Create variable
    • Variable name = maxDueDate
    • Smart value = {{lookupIssues.Due date.max}}
  • Action: Edit issue
    • Field = Due date
      • Value = {{maxDueDate}}

^ You could also try using the smart value in the "Edit issue" action directly, i.e {{lookupIssues.Due date.max}}

Ste

anu_m
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!
June 20, 2024

This worked . Thanks 

Like Ste Wright likes this
vito_iannuzzelli October 18, 2024

Can you share the resulting automation completed so we can visualize it?

0 votes
Marc - Devoteam
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.
June 20, 2024

Hi @anu_m 

No, that is not possible.

First thing, branches on one-and-only-one issue (e.g., branch on parent) get run in-line, as if there was no branch. 

Branches which could be on multiple issues/things (e.g., JQL, linked issues, etc.) are run asynchronously and in parallel. 

There is no guarantee when the branch will end or the order of processing...right up to the last step in the rule.

https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Ordering-of-branch-executions

Next, because of the multi-issue branch, creating a variable in the branch means it will not be visible outside of the branch...it will be repeatedly recreated from scratch and thrown away with each loop.

I suggest you to open an issue at Atlassian Support, it might be that there is a solution or it will be placed as a fearture on the ira backlog

Suggest an answer

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

Atlassian Community Events