Automation Issue: Sub-task / task creation

Breanna Williams July 3, 2023

Hello! For context, I am in a company-managed project as an admin.

 

I have created an automation rule for a recurring TASK that will take place every monday (reporting) -- nothing out of the ordinary.

I created a 2nd automation rule for sub-tasks to attach to the recurring task above.

 

When I run the task rule as a test for the sub-task rule, the sub-tasks will NOT populate no matter what. HOWEVER, when i created the same task manually, the rule was triggered?

 

will the sub-task rule naturally trigger when/ the automated task actually triggers next monday? i.e it won't register it now because i am essentially pushing the task out myself?

 

for additional context -- in the audit log -- nothing is triggered when i test the task rule (no errors/etc/literally nothing)

 

2 answers

1 accepted

4 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2023

Since the second automation is triggered by the first one you have to go to Rule details and check Allow rule trigger for it to work.

Rule trigger.png

Breanna Williams July 3, 2023

Thank you soooo much!!!

1 vote
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 3, 2023

Hi @Breanna Williams 

@Mikael Sandberg answered why your second rule was not triggering.

And I wonder: why do you have two rules rather than creating the subtasks with the task in the initial rule?  You can do that by branching to the most recently created issue (after creating it) and then add the subtasks.

Kind regards,
Bill

Amanda Caton March 13, 2024

@Bill Sheboy Have you ever encountered an issue where the most recently created issue is not the one you intended? ie. the subtasks get created on a different task that happened to get created after the automation of the task you intended the subtasks to be created for? That is my only concern with using the most recently created issue.

I do not understand why Atlassian would not provide creating a tasks AND subtasks based on a schedule trigger by default. This seems to be a pretty common use case.

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.
March 13, 2024

Hi @Amanda Caton 

As this is an older thread, it is often better to create a new question and link back to the older ones.  That will ensure more people see it and offer suggestions; otherwise only those following the older threads (or who are mentioned) will see it.

 

Back to your questions...

Yes, I have seen {{createdIssue}} and {{createdIssues}} have apparently "incorrect" values, but they were working-as-designed.  The scenario is related to where in the rule the issues were created.  Branches which could be on more than one thing are executed in parallel and asynchronously, and there is no guarantee when the branch will complete...up until the last rule step.  In that case, there is no information on issues created in the branch to provide to the main rule flow.

 

A more likely scenario is an error in rule logic, like a missing branch.  For example this one works:

  • trigger: scheduled
  • action: create issue, for a Story
  • branch to most recently created issue
    • action: create sub-task

The create sub-task action is context specific, and so tries to create as a child of the current issue.  Often people forget the branch, and in the best case, the rule shows an error.  In the worst case, if your trigger brings in issues with JQL, the sub-task goes to the wrong parent.

 

You are correct: this is a common scenario for teams who use sub-tasks.

There is a template rule (in projects) to create an issue, without sub-tasks.  And there is an example rule in the template library to add sub-tasks to a created issue.  But there probably isn't a combined one because the first rule could be quickly modified by adding the last two steps I show above.

 

If this did not help your scenario, please create a new question, showing your rule, explaining what is not working, and mention me so I can find it.  Thanks!

Kind regards,
Bill

Amanda Caton March 13, 2024

@Bill Sheboy - thanks for advising me on the best approach to posting - this was my first post so I appreciate the feedback and will follow that guidance in the future.

I also appreciate your clarification that the most recently created issue is within the context of that rule which prevents conflicts with other tasks being created which is what other responses to the post seemed to be concerned about. 

Suggest an answer

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

Atlassian Community Events