As 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!
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:
Kind regards,
Bill
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.