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 # people like this
C_ Faysal_CFcon_
Community Champion
April 6, 2026

thank you @Trudy Claspill

 

Like Trudy Claspill likes this
Snehal Singh
April 7, 2026

This is the same approach I followed but with its checks only first if else condition and comes out of the loop. 

eg : 

Loop

first If else - if abc is not present then create abc

second if else - if pqr is not  present create pqr

 

this gave me right data in loop but as first if else failed - it didn't performed second if else

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

Snehal Singh
April 7, 2026

thank you @Bill Sheboy for pointing this out!

As if else wasnt working now i tried advanced compare but its too failing. Its not checking for the existing summary and still keeps on adding, that too the number of issues it got in loop up.

 

Looking forward for the resolution!!

  • what version of Jira are you using: Cloud, Server, or Data Center - Jira cloud -

    Jira v10.3.5

  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc. - company - managed

Here all the screenshots - 

Complete Rule - 

image.png

 

Advanced compare

image.png

 

Action 

image.png

 

Audit Log

discovery jira.png

 

Trudy Claspill
Community Champion
April 7, 2026

Hello @Snehal Singh 

In your reply to @Bill Sheboy you have indicated that you think you are using Jira Cloud. You are not. You are using Jira Data Center. This is apparent because you indicate you found the version number of the app to be 10.3.5. Jira Cloud (the software-as-a-service product) does not have a version number in that form. Also, we can tell from the graphics in your image that you are using Jira DC - the graphics in Jira Cloud are different.

Additionally you are not actually using an IF/Else structure.

I'm not able to work on the solution myself right now, but Bill provides the best advice on Automation Rules, so I'm sure he will be providing you with options that will work.

Like Bill Sheboy likes this
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 7, 2026

Thanks for the images / information, @Snehal Singh and thanks for helping clarify the scenario, @Trudy Claspill 

 

The general pattern of the rule you want is as below, using if / else blocks for each dependent Discovery type issue.

  • trigger: scheduled, with JQL to find relevant Epics
  • action: lookup issues, with JQL to get the children of the Epic which have a Summary containing exact match your "abc".  That is, your JQL plus the exact phrase syntax:
 summary ~ "\"abc\""
  • if / else condition block
    • advanced compare condition: check if the lookup found nothing
      • first value: {{lookupIssue.size}}
      • condition: equals
      • second value: 0
    • action: Create issue, for the Discovery item for "abc"

 

Now we repeat the above steps for the other Summary values, noting each uses a separate lookup issues action and if / else condition block...

 

  • action: lookup issues, with JQL to get the children of the Epic which have a Summary containing exact match your "pqr".
  • if / else condition block
    • advanced compare condition: check if the lookup found nothing
      • first value: {{lookupIssue.size}}
      • condition: equals
      • second value: 0
    • action: Create issue, for the Discovery item for "pqr"
  • ...and so on.

 

This approach is less efficient than using one single lookup and list filtering, but I recommend getting it to work first and then focus on improvements.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events