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

1 answer

1 accepted

1 vote
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

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