Forums

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

Automation Error with sequential tasks

Sophia Skinner May 9, 2025

Hello Atlassian community! 

I have a semi-failing automation with no clear explanation.

To set the scene here: I am attempting to create a rule to auto populate tasks based on epic with tasks following sequentially from the epic due date. This is sort of working.... it will sequence the first 7 tasks in the correct order, but will not complete the remaining 4. The Epic still displays the proper duration as if these were included though. Attached are some screenshots of the timeline and an example of how I configured the automation. I have tested the automation twice and the exact same problem happens 

Any ideas about why this is only sort of working? 

Screenshot 2025-05-09 155403.pngScreenshot 2025-05-09 155546.png

 

2 answers

1 accepted

3 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.
May 9, 2025

Hi @Sophia Skinner -- Welcome to the Atlassian Community!

Without seeing your complete rule (in a single image) and the audit log details, I have some questions which may help explain what you are seeing:

  1. First, does the rule add each task, one by one, or is there any form of branching in the rule?
  2. You describe "the first 7 tasks in the correct order, but will not complete the remaining 4".  What do you mean by "will not complete the remaining 4"?
  3. Your description indicates 7 + 4 = 11 tasks, but the image of the Epic shows 12 child tasks.  Were those created by the same rule?
  4. With the number of tasks added, and apparently setting the dates with manual increments of the values, have you checked for any errors in the number values for each task?

 

Kind regards,
Bill

Sophia Skinner May 9, 2025

Hello Bill, thank you for following up! 

 

1. no branching see photo below

2. Number was wrong in my intial text. there are 16 total tasks. the first 12 populate and the last 4 do not. 

3. same as above

 Screenshot 2025-05-09 164623.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.
May 9, 2025

Thank you for that information.

Is the symptom the last four tasks added have incorrect values for the Due Date and Start Date, or something else?

If the dates are incorrect, please show an example of the values used to set the Due Data and Start Date values.  I want to see the expressions, so please post those as text in your response (rather than as a screen image).

And, have you reviewed the Create Work Item actions for those four to confirm their expressions are correct?

Sophia Skinner May 12, 2025

Thanks for the help @Bill Sheboy 

 

The last four tickets are populated with the following information as part of their automation: 

 

Summary: TRR MEETING

Due Date: {{triggerIssue.dueDate.minusBusinessDays(20}}

Start Date: {{triggerIssue.dueDate.minusBusinessDays(21)}}

Parent: Trigger work item 

 

As an example from another ticket where the automation does work: 

 

Summary: Stakeholder TRR Documentation Development

Due Date: {{triggerIssue.dueDate.minusBusinessDays(51)}}

Start Date: {{triggerIssue.dueDate.minusBusinessDays(56)}}

Parent: Trigger work item

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.
May 12, 2025

Thanks for that information, and I see a few things to check:

  • Your rule trigger is Work Item Created.  That specific trigger can have timing / racetrack problems where the rule starts before all data is available, leading to unpredictable rule behavior (and sometimes errors).  The mitigation is to always add the Re-fetch Work Item Data immediately after the Work Item Created trigger.  This will slow the rule slightly, reloading the data before it proceeds to the next step
  • Smart values are name, spacing, and case-sensitive.  The one for the Due Date field is duedate, as in {{triggerIssue.duedate}}  Please try changing your smart values to match.
  • For the TRR MEETING task creation, the closing parenthesis is missing when setting the Due Date.  Is that a typo or is it actually missing?

 

Sophia Skinner May 12, 2025

For additional context, this is what the error is showing 

Screenshot 2025-05-12 095525.png

Sophia Skinner May 12, 2025

Would you provide more information about how to add the Re-fetch Work Item Data immediately after the Work Item Created trigger?

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.
May 12, 2025

I am glad to learn adding the parentheses solved this!

 

Regarding the re-fetch, that is this action: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Re-fetch-issue-data

The change to the rule would be this (in bold below):

  • action: work item created
  • action: re-fetch work item data
  • condition: issue type is Epic
  • action: create work item for the Task
  • ...

 

This will reduce the risk of errors for the condition and copying of fields in the other actions.

0 votes
Sophia Skinner May 12, 2025

It was the parenthesis!! Thank you so much for that catch. I accidentally duplicated that error for the last 4 tickets. They are now populated. Really appreciate your help. 

Suggest an answer

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

Atlassian Community Events