Forums

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

Multiple subtask creation stops after first block

Mohammed_Zeyad July 7, 2025

I'm trying to set up a daily automation that creates subtasks under multiple parent issues, but the rule stops after processing the first parent task. Here's what I'm trying to achieve:

Current Setup (not working properly):

When: Scheduled daily at 9:00 AM
If: Issue key = FIB0PT-94
Then: Create 2 subtasks
If: Issue key = FIB0PT-96
Then: Create 2 subtasks

chrome_hVD6StBbcP.png 

3 answers

1 vote
Trudy Claspill
Community Champion
July 7, 2025

Hello @Mohammed_Zeyad 

When you use a simple IF condition the rule will stop running with the first IF condition that does not pass.Screenshot 2025-07-07 at 10.40.55 AM.png

If the issue key matches Condition 1 then the Create components immediately following 1 will be executed. When the IF condition at Condition 2 is evaluated, it will fail because the issue key does not match, and the current loop of the Scheduled rule will stop running. 

If the issue key does not match Condition 1 then the current loop of the Scheduled rule will stop running immediately.

You will never get a loop of the Scheduled rule that will match conditions 2..n because the rule cannot match both Condition 1 and any subsequent condition.

How do you determine the issues under which subtasks need to be created? Is it always the same set of issues that are getting subtasks? Do you specify the issues using the Execute JQL option in the Scheduled trigger?  

Are you creating identical subtasks under every issue, or do the subtasks differ depending on the parent issue?

If the subtasks are identical for every issue, and you are specifying the issues using the Execute JQL option in the trigger issue, then you don't need the IF conditions at all. Following the Scheduled trigger simply add the components to create two Subtasks. Those same two Subtasks would be created for each issue retrieved by the JQL of the Scheduled trigger.

If the Subtasks need to be different for each parent then you need to use the IF/ELSE condition.

Screenshot 2025-07-07 at 10.54.55 AM.png

With If/Else the rule checks if the first condition passes. If it does then it executes the components directly below that condition. The rule then skips all the Else If conditions and proceeds with the steps that follow that block.

If the first condition doesn't pass, then the rule check the second condition (the Else If). If that condition passes, then the steps following it are executed, and the rest of the Else If conditions are skipped, and the rule proceeds with the steps that follow after the If/Else block.

Mohammed_Zeyad July 7, 2025

Thanks @Trudy Claspill  for the detailed reply

 

Unfortunately, my case is a bit different from the two examples you mentioned. The reason I used standalone IFs is because I approached it from a sequential programming mindset.

 

Let me clarify:

I have a project with an epic that contains 9 tasks. Each of these 9 tasks has 2 to 4 distinct recurring subtasks that need to be created daily — meaning I don’t want to skip any of them.

 

What I’m aiming for is something like this:

 

Task 1

 

Subtask A

 

Subtask B

 

 

Task 2

 

Subtask C

 

Subtask D

 

 

Task 3

 

Subtask E

 

Subtask F

 

 

…and so on, up to the ninth task.

 

What I need is a way to automate this structure so that these subtasks are recreated every day under the right parent tasks. Any suggestions or workarounds that could help achieve this?

Trudy Claspill
Community Champion
July 7, 2025

Hello @Mohammed_Zeyad 

In your current rule you must select the issues to operate against. How are you doing that? Based on what I see you must be using a JQL in the Scheduled trigger. Please share the details of the trigger and the details of the JQL.

When a JQL is used in the Scheduled trigger the actions in the rule will be executed against each of the retrieved issues from the JQL. In that case the If/Else option will absolutely work as I described.

 

This is just one way to accomplish the requirement and will require maintaining a lot of components in your rule.

 

There are other ways to accomplish this with Automation. For example

- In each of the 9 tasks create a copy of each of the subtasks that needs to be created daily and add a label to it like "subtask-template"

- Create a rule with a Scheduled trigger and a JQL to select the 9 tasks.

- Add a Branch - For Each Sub-task
-- Condition: If Labels contains-any-of subtask-template
-- Clone Issue

Screenshot 2025-07-07 at 2.27.08 PM.png

0 votes
Lukas Nicolai_Seibert
Atlassian Partner
July 8, 2025

Hey @Mohammed_ZeyadIf you have 9 tasks with distinct recurring subtasks that need to be created daily, I think Templating.app could also be a good alternative for you.

  • You can easily create issue templates for hierarchies epic, issue, subtask
  • These templates also work with automation support 

You can find us at the Atlassian Marketplace ➡️ https://marketplace.atlassian.com/apps/1224664 

This is how this might look like:

Templating_app_Jira_Templates.png

0 votes
Gor Greyan
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 7, 2025

Hi @Mohammed_Zeyad
Thanks for the question.

Try putting the following JQL into the Schedule Issue trigger.

key in (FIBGPT-94, FIBGPT-96)

Mohammed_Zeyad July 7, 2025

Hi @Gor Greyan 

tired it but still stops excuting after the first part runs

Screenshot 2025-07-07 at 4.51.02 PM.png

Gor Greyan
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 7, 2025

@Mohammed_Zeyad
Thanks for the answer.

Try to add a “For each issue” Branch:

After the trigger, add a "For each: Issue" action.

Inside the branch, use the If/Else condition.

Scheduled Trigger (JQL: key in (...))
|
|---> For each issue:
|
|---> If issue = FIBGPT-94
| |---> Sub-task A
| |---> Sub-task B
|
|---> If issue = FIBGPT-96
|---> Sub-task C
|---> Sub-task D

Mohammed_Zeyad July 7, 2025

Thank you, but still runs only once 

Screenshot 2025-07-07 at 6.05.38 PM.png

Gor Greyan
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 7, 2025

Hi @Mohammed_Zeyad
Thanks for the answer.
Please try this solution.The second image is the For Each branch comparison, what to write there.
Screenshot 2025-07-08 100905.pngScreenshot 2025-07-08 100957.png

Suggest an answer

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

Atlassian Community Events