Forums

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

Setting dueDate of Parent using lookupIssues.dueDate.max not working

Peter McCann July 11, 2025

image.pngimage.pngAs shown in the above photos, I am triggering off a story or task level due date change, jumping into the parent, setting a variable called maxDueDate using the smart value {{lookupIssues.dueDate.max}} looking for the largest due date of the parent's child issies, and then use the edit work item field action to set Due Date to the {{maxDueDate}}. 


The intention here is if someone changes a story's due date, the epic always shows the max due date of it's children. 

Currently this does not work, but the audit log says the branch is executing. 

Can someone tell me why it does not execute? 

As a note, the use of "dueDate" is due to naming of the field in our implementation. Worrying is the smart values helper lookup menu cannot find the "lookupIssues.duedate" option, but it can find them for other "lookupIssues" in the variable creation step. 

 

Thanks for the help! 

1 answer

1 accepted

5 votes
Answer accepted
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.
July 11, 2025

Hi @Peter McCann 

To use the {{lookupIssues}} smart value, you need to first add the Lookup Work Items action to the rule.

For your scenario, inside the branch as a first step, add this:

  • ...
  • branch: to parent
    • action: lookup work items, with JQL of
      • parent = {{issue.key}}
    • action: edit work item fields, to update the Due Date

 

Kind regards,
Bill

Peter McCann July 14, 2025

It did not solve the issue. 

I am seeing the rule trigger, and the status says success, but no due date changes were made to the epic parent of the story I changed the due date field for. 

I am only seeing the automation trigger when I manually change the due date field in the child story issue type. It does not trigger at all when a different automation changes the due date of the child story issue type. 

 

I wrote a comment to the parent epic to see what the max date was at the time it was being assigned to the Due Date field in the Epic. This correctly captures the due date I was setting for the child story. So I know up to the edit work item field step in the workflow, the due date is correctly detected, but it fails to change it on the epic with no errors. image.png

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.
July 14, 2025

First, please post an image of your updated, complete rule for context.  Thanks!

 

Next, by default the actions of one rule do not trigger other rules.  This is to prevent accidental looping problems.

When you intentionally want the actions of one rule to trigger others, in the downstream rule enable this option in the details at the top of the rule:

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

Peter McCann July 14, 2025

Updated Flow 

image.pngimage.pngimage.pngimage.png

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.
July 14, 2025

Your Edit Work Item action has no value for the Due Date field, and so it is clearing it. 

And, the smart value for the Created Variable action is incorrect: the one for the Due Date field is duedate (i.e., smart values are case-sensitive).

 

Rather than using the variable in the Edit Work Item action, please set the field to this expression:

{{lookupIssues.duedate.max.jiraDate}}

 

Peter McCann July 14, 2025

If the smart value was incorrect how would I be getting accurate dates in the comment at the end of the workflow into the parent epic? 

Peter McCann July 14, 2025

The screen shot I gave was an editied version I was working on and that field got cleared. The current live version has the smart value recerence.
Again, I reference that smart value in the comment step and it writes it correctly to what was chosen in the child story every single time. 
image.png

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.
July 14, 2025

I suspect it "worked" for the comment because the Due Date is one of the earliest fields supported by rules, and so has multiple different capitalizations versions.  If you check the endpoint spec, it is "duedate".  Now that we have excluded that as a cause...

 

For the rule image you just posted, the smart value used in the Edit Work Item action does not match the variable:

  • Your created variable is named {{maxDueDate}}
  • Your edit action uses {{maxDaueDate}}
Peter McCann July 15, 2025

Ugh. Yeah, that was it. Thanks for the assist! 

Like Bill Sheboy likes this
Peter McCann July 17, 2025

@Bill Sheboy I need to ensure that when a story has the due date removed, and no due dates are assigned to any story under a parent epic, that the parent epic then has the due date set to empty. 

As seen in this screen shot, I tried adding an IF to check if the variable "maxDueDate" was empty after the issues.dueDate.Max result was assigned to it. I hoped this would let me decide to either set to the maxDueDate or to use the {{clear}} smart value and remove the parent epic due date. This did not work. 

Any guidance on how I might accomplish this?

image.png

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.
July 17, 2025

Hi, @Peter McCann 

Please try using the if / else condition block for this case:

https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/#If-else-block

For example:

  • ...
  • action: lookup work items
  • if / else block
    • smart value condition: to check if the lookup returned your value
    • action: edit work item, to set the field value
  • else
    • action: edit work item, to clear the field value by leaving the value empty

 

Suggest an answer

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

Atlassian Community Events