Forums

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

Create An Automation Rule to create child issues in epic with specific summary

Snehal Singh
April 6, 2026

here's the use case

 

1) I have to create 3 child issues in an epic. Mandate is to have it scheduled event and not the trigger based as the epic is already uploaded in jira through different system


2) Add 3 issues in an epic with summary <abc> , <pqr> and <lmn>
3) As its scheduled event , with scheduled jql - I am getting list of epics. Hence while adding these child issues, I have to  make sure I am not adding it multiple times.

Eg : If in case issue with summary abc is already present then same should not get added again.

 

Tried approach- 

Lookup for all child issues

Advanced compare for summary not in abc - then create abc

similarly for PQR and lmn

 

This is working for the first time but failing on second run onwards

 

6 answers

3 votes
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 Champions.
April 6, 2026

Hi @C_ Faysal_CFcon_ 

What is the source of the content you posted?

As a reminder, posting completely bot / AI-generated content is not permitted in this community.  And when such tools are used to modify content for a post, the sources are to be described in the text.  To learn more, please carefully review the community rules of engagement / guidelines:

https://community.atlassian.com/forums/custom/page/page-id/rules-of-engagement

 

Indications the source of the post is bot / AI-generated are:

  • The suggested rule cannot work due to the use of conditions rather than conditions within multiple if / else blocks: the rule will halt on the first condition which does not succeed 
  • The structure of the content in the post 
  • The mixed formatting of the post text 

 

Kind regards,
Bill

1 vote
C_ Faysal_CFcon_
Community Champion
April 6, 2026

Hi @Snehal Singh 

if i understood your desired goal correctly:


The root cause of your issue

Your single Lookup + Advanced Compare approach works on the first run because there are 0 child issues yet. On the second run, the lookup returns existing issues, and the Advanced Compare fails to evaluate correctly because it operates on the entire result list - not per summary individually.

 

Recommended fix: One separate Lookup per summary

Instead of one lookup for all child issues, use three independent Lookup -> Condition -> Create blocks inside your Epic branch:

[Trigger] Scheduled
->JQL: <your Epic query>

[Branch: for each Epic]

[Lookup Issues] Name: lookupAbc
-> JQL: parent = {{issue.key}} AND summary = "abc"
[Condition] {{lookupAbc.size}} equals 0
-> [Create Issue] Summary = "abc" | Parent = {{issue.key}}

[Lookup Issues] Name: lookupPqr
->JQL: parent = {{issue.key}} AND summary = "pqr"
[Condition] {{lookupPqr.size}} equals 0
->[Create Issue] Summary = "pqr" | Parent = {{issue.key}}

[Lookup Issues] Name: lookupLmn
->JQL: parent = {{issue.key}} AND summary = "lmn"
[Condition] {{lookupLmn.size}} equals 0
->[Create Issue] Summary = "lmn" | Parent = {{issue.key}}

Key points to note:

  • Use summary = "abc" (exact match) not summary ~ "abc" because the ~ operator is a full-text search and can cause false positives with partial matches
  • Give each Lookup a unique name (lookupAbc, lookupPqr, lookupLmn) so their results are stored independently
  • {{lookupXyz.size}} equals 0 checks that no issue with that summary already exists, making the rule fully idempotent and safe to run on any schedule
  • Always set the Parent field to {{issue.key}} in the Create Issue action to ensure the child issue actually lands inside the Epic

This way, each of the three summaries is checked and created independently, so a second (or tenth) run will never create duplicates.

Best 

cF

0 votes
Rune Rasmussen
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.
April 7, 2026

Depending on the specifics of your situation a simple solution could be to append the Summary with something to indicate that the child items has been created.
Or make a comment like "Children automatically created" and use a condition to check for it.

From the JQL documentation you should be able to filter it like this:
comment ~ "\"Children automatically created\""
https://support.atlassian.com/jira-software-cloud/docs/jql-fields/#Comment

0 votes
C_ Faysal_CFcon_
Community Champion
April 6, 2026

Just a little heads-up @Snehal Singh . I fed your exact requirement into our Alchemist agent:

"Add 3 issues in an epic with summary <abc>, <pqr> and <lmn>. Scheduled event with JQL. Make sure not adding it multiple times. If issue with summary abc is already present then same should not get added again."

The core problem: as @Bill Sheboy  pointed out, you need If/Else blocks. Bare Conditions halt the entire rule on the first one that fails, so pqr and lmn never get checked. If/Else blocks let the rule continue to the next block even when the condition is false.

The pattern (per summary):

  • Lookup Issues -- parent = {{issue.key}} AND summary ~ "abc" (name it lookupAbc)
  • If/Else -- {{lookupAbc.size}} equals 0
  • Create sub-task -- Summary: "abc"
  • End If/Else


Same block for pqr and lmn with their own named lookups. The screenshot shows all three:

Builder_AI.png

Possible Optimization: This should also work with a single lookup that fetches all children, then three If/Else checks against {{existingChildren.summary}} does not contain "abc", "pqr", "lmn", reducing three lookups to one.

Disclosure: I'm the developer of "Alchemist for Jira", a ScriptRunner companion. I used its Script Builder and as expected it detected that your use case doesn't need a script at all. Native Jira Automation handles it.

Trudy Claspill
Community Champion
April 6, 2026

Hello @C_ Faysal_CFcon_ 

Your answer has provided some incorrect information.

There is no option to assign a Name to a Lookup Work Items action, so smart values like {{lookupAbc.size}} are not going to work. The smart value must be {{lookupIssues.size}} in all cases.

Like Bill Sheboy likes this
C_ Faysal_CFcon_
Community Champion
April 6, 2026

thank you @Trudy Claspill

 

Like Trudy Claspill likes this
0 votes
C_ Faysal_CFcon_
Community Champion
April 6, 2026

Hi @Bill Sheboy,

Thank you for pointing this out. You are right and I apologize - I used an AI tool to help draft the response and should have disclosed that clearly from the start. 

Best, cF

0 votes
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 Champions.
April 6, 2026

Hi @Snehal Singh 

For a question like this, context is important for the community to help.  Please post the following:

  • what version of Jira are you using: Cloud, Server, or Data Center
  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc.
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case 

 

Also for the Community Managers: this question was posted in App Central as a discussion.  Please move it to the question area for Jira or Automation.  Thank you!

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events