Forums

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

How to create child issues in order

Ivan Legazpi
Contributor
January 9, 2026

I'm trying to solve an issue and have run out of ideas and suspect I might be approaching this the wrong way and there could be a easier solution that is escaping me, so I though I would post it here and maybe someone has a clever way to achieve what I want to or points a flaw in my logic

Scenario

I have a purchase work item (epic - level 1) and based on the number of payments (numeric field) at some point an automation it is triggered to generate the child work items (tasks - level 0) that represent the number of payments. So if the # of payments field is 3, 3 work items will be created with the summary Payment 1, Payment 2 and Payment 3

Goal
I would like for the payments to be in order of creation to simplify sorting in the UI, reporting, etc. I'm aware that I could achieve this with sorting by text, etc. But I would like it to be right from the creation so it is the same experience for all the users

 KeySummary 
 ABC-123Payment 1 
 ABC-124Payment 2 
 ABC-125Payment 3


Challenge

In order to dynamically create the child work items, I'm using a lookup table as suggested here: https://confluence.atlassian.com/automationkb/automation-rule-looping-on-a-numeric-value-in-jira-automation-1416563126.html

and it works well. Creates as many issues as the integer in the field. The problem comes with how Jira seems to handle loops and branches, and the issues are created out of order.

 

 chrome_fIyGihGjCd.png

 

chrome_61hlWF45Bl.png

 

chrome_eVegaaB2uf.png

 

chrome_X8dzSEKw9t.png

 

As you can see in this example, the issue summary is created out of order

msedge_YxwqcRucev.png

In this documentation it explains that

Branches on multiple issues (such as 4 sub-tasks) will run in parallel with no guarantee one will finish before the next one starts. Therefore, you cannot rely on changes between branches.

Limitations
- I can't use any plugins (Scriptrunner is not an option)
- I'm on Jira Cloud

What I tried

- Adding a delay in the branch. Does not make a difference

- Trying to rename with a second automation. I was not able to get an index of the loop (like I would do in a programming language) to use in the summary

 

If anyone has a good idea or knows how to do this in a better way, your input is much appreciated.

3 answers

0 votes
Damiano Di Battista
January 9, 2026

Hi @Ivan Legazpi,
given the limitations due to the way Jira handles parallel issue creation, if the numeric field has a known maximum value (e.g. the maximum number of possible payments is 5), you could try creating the tickets sequentially using an automation with multiple IF conditions.

This is a somewhat dirty workaround, but it is the only one that forces Jira to execute the actions sequentially. I tested the following rule and it seems to work.

When: Issue created
If: customfield_10471 is greater than or equal to 1
Then: create sub-task – $issue_key$ Payment 1
If: customfield_10471 is greater than or equal to 2
Then: create sub-task – $issue_key$ Payment 2
etc.

Important: use If and not Else if

Warning: if other tickets are created while the automation is running (3–5 seconds), you may lose sequentiality at the issue key level.

Best regards
Damiano

0 votes
Rudy Holtkamp
Community Champion
January 9, 2026

Automation for Jira is handling the branch (the for-each-component) as multi-threaded, so when you create an item in a branch you will not be able to control the order in which they are created. 

You might do this by using calling a web request automation rule. But only when the number of fields that you need to update are limited.

Step 1. First automation rule.

Do what you need to do to determine the order you want to create the items. Say you have 3 items and want to have a summaries like: Payment 1, Payment 2, Payment 3
And respectively you want to have descriptions: This is payment 1, This is payment 2, This is payment 3. Put these in different vars, like {{summary}} and {{description}}

But this in a JSON:

{
"summary": "{{summary.jsonEncode}}",
"description": "{{description.jsonEncode}}",
"customfield_123": "{{cf_123.jsonEncode}}"
}

Create component called 'send webrequest' and post it to the URL we will create in step 2. Use the JSON similar as above as payload.

Step 2. Second automation rule

Create a trigger 'Incoming webhook' and use the URL + ?issue={{issue}} and secret in the first rule. E.g. https://api-private.atlassian.com/automation/webhooks/jira/a/226a29aa-455f-46d7-9e00-1dee77366bdc/017cf741-c6ba-7ef1-9dbc-b7d35edeb366?issue={{issue}}. And use as header: X-Automation-Webhook-Token: 401f4b0c5cffeb34f6dc03f57d1cdd22a7150c2b'

Create a var {{newSummary}} with value {{webhookData.summary.substringAfter(",")}}

Create a var {{thisSummary}} with value {{webhookData.summary.substringBefore(",")}}

Create a var {{newDescription}} with value {{webhookData.description.substringAfter(",")}}

Create a var {{thisDescription}} with value {{webhookData.description.substringBefore(",")}}

Do the same for customfields.

Note here I used a comma (,) as separator, make sure you use a separator that is not used as a character in your summary/description/customfield.

Now you can create a new work item, use thisSummary and thisDescription.

Once created and the var {{newSummary}} is not empty, call this automation rule again with JSON

{
"summary": "{{newSummary.jsonEncode}}",
"description": "{{newDescription.jsonEncode}}",
"customfield_123": "{{cf_123.jsonEncode}}"
}

Final note: No the webhook and token I posted won't work ;-) 

0 votes
Sharad Dadarao Chate
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 Champions.
January 9, 2026

@Ivan Legazpi Hi,

 

In Jira Cloud, this behavior is expected and unfortunately cannot be fully controlled. Automation branches that create multiple issues (using lookup tables or “for each” logic) run in parallel, not sequentially, so Jira does not guarantee the order in which child issues are created or assigned issue keys. Because of this limitation, there is currently no supported way in Jira Cloud (without apps) to force child issues to be created strictly in order (Payment 1, Payment 2, Payment 3 by key). Delays do not help, and Jira Automation does not expose a loop index you can reliably use. The only practical workarounds are to rely on summary text sorting, add a custom numeric field (e.g., Payment Number) populated during creation for reporting/sorting, or accept that creation order cannot be guaranteed. This is a known limitation of Jira Cloud automation, not a flaw in your logic.

 

Suggest an answer

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

Atlassian Community Events