The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

JQL query in automation not returning the same results as when used in a filter

james_vanderhaeghe
March 19, 2025

Good Day,

I have a JQL query that is looking at sub-tasks (status and summary) to then trigger some automation. When I put it into the "Related Issues Condition" as "some match specified JQL" and validate the query, I get only two results. When I put the exact same query into a normal filter, I get 50+ (which is the correct number).

The query is -> 

(Status = Impacted) AND ((Summary ~ "TTO - IT, Cyber & Corporate" ) OR (Summary ~ "TTO - Data, Ops & Cargo") OR (Summary ~ "TTO - Customer"))

When I run this in the automation, it returns only my "TTO - Data, Ops & Cargo" items, and no "TTO - Customer" items (there are none for the IT, Cyber & Corporate)

All these results are in the same project and should be showing up on the subtask filter.

What could be causing the difference and how can I resolve this?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
james_vanderhaeghe
March 19, 2025

I've resolved the issue with the exact text syntax. "\"

0 votes
Vishal Biyani
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 19, 2025

@james_vanderhaeghe 

What is your trigger in the automation?

Are you using lookup issues component to JQL?

Can you share screen shot of your automation to understand where the issue might be?

james_vanderhaeghe
March 19, 2025

The overall trigger is a transition of the parent issue to a particular status, and then whether that issue has certain key words in the summary. That works fine. The issue is the JQL for the subtasks, which as I stated initially, works if it is alone in a query but not as part of the JQL in the automationScreenshot 2025-03-19 091954.png

Vishal Biyani
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 19, 2025

Let's assume you have Story or a Task and subtasks are created under it.

When Story/Task is transitioned to Design & Development, the automation kicks in.

Instead of branching for Current Issue, if you branch for subtasks the focus will shift to each subtask.
Add and if to check Status and Summary match the conditions specified,

then take next action.

Can you check if this approach works for you?

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events