Forums

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

How to setup Jira Automation that checks for subtasks in a ticket before performing action

Logan Reichert
March 16, 2026

Hello! I'm trying to setup a automation that auto-fills a sub-task description whenever certain number of fields are populated (These fields hold info relating to the sub-task description).

I'm running into a issue of how I would have the rule check if the sub-task is already created. Otherwise it will duplicate the sub-task every-time the work item is updated. 

 

Workflow I'm trying to achieve: 

When: Work item Updated (Conditions applied: Role =! Empty, Start Date =! Empty, Team =! Empty)

IF: Some subtasks match : parent = {{issue.key}} and type = Sub-task and summary ~ “Add to Tool”

---Stop rule (Don't add the sub-task)

ELSE: Create sub-task, auto-fill description with smart-values

 

Am I using the JQL correctly? Any Recommendations to how I should set this rule up?

 

This is what I have so far: image.png

2 answers

1 accepted

4 votes
Answer accepted
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.
March 16, 2026

Hi @Logan Reichert 

I recommend not using a JQL condition to check for the presence of the child / sub-task of the trigger work item.

Instead, please use a Lookup Work Items action with the JQL to check for the subtask and an Smart Values condition to check the count returned is 0.  This will give you more precise control over what is checked.  For example:

  • ...
  • action: lookup work items, using your JQL to find the subtasks
  • smart values condition:
    • first value: {{lookupIssues.size|0}}
    • condition: equals
    • second value: 0
  • ...

Also, I recommend testing your JQL outside of the rule with an example trigger work item using an search.  This will confirm you have the correct type name for your sub-task: subtask versus sub-task versus ...

 

Kind regards,
Bill

0 votes
Logan Reichert
March 17, 2026

Coming back to post the solution and what worked for me. 

the JQL statement was parent = {{issue.key}} AND issuetype = "Sub-Task" AND summary ~ "Add to Tool"

Here is the finished rule with logic to only perform actions whenever specific fields are filled and logic to prevent duplication of sub-tasks. Thank you!

image.png

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.
March 17, 2026

Thanks for posting the rule image, @Logan Reichert 

Perhaps as an adjustment: are you expecting the exact phrase "Add to Tool" in the Summary?

As written for that JQL expression, the CONTAINS ~ operator will perform a "fuzzy match" on those words: Add, to, and Tool.  When you expect the exact phrase, please try this syntax:

AND summary ~ "\"Add to Tool\""

 

Like Logan Reichert likes this

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