Forums

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

JQL Question

Rocsana Chereches
Contributor
June 27, 2022

Hi community,

I am writing with a question about JQL language.

I want to write a query that will retrieve only the issues that contain those two options (in my instance TNL and NGN in one ticket and only those values). I only seem to be able to have gotten as far as the query that I wrote retrieves tickets that contain either TNL, either NGN either tickets with both TNL and NGN on it. 

Here is the query I wrote: project = ATWP AND "Relevant Analytics Team[Select List (multiple choices)]" = "Do Not Use - Content Analytics" OR "Relevant Analytics Team[Select List (multiple choices)]" = "Do Not Use - Marketing Analytics" AND "Title Group[Select List (multiple choices)]" = TNL AND "Title Group[Select List (multiple choices)]" = NGN 

 

Can you see something wrong with it/Jira does not allow for more?

Thank you,

Rocsi

1 answer

1 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
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 Leaders.
June 27, 2022

This is likely to be the wrong query because you have mixed AND and OR to join all the clauses together without telling it how you think it they are actually joined up.  Jira just reads left to right, and that means your query really isn't going to do what you think.

Use parentheses to explain the question in the right order.

I can't work out quite what you were trying to do here, your description of the query only explains part of it, but I think what you really need is

project = ATWP

AND ( "Relevant Analytics Team[Select List (multiple choices)]" = "Do Not Use - Content Analytics" OR "Relevant Analytics Team[Select List (multiple choices)]" = "Do Not Use - Marketing Analytics" )

AND ( "Title Group[Select List (multiple choices)]" = TNL OR "Title Group[Select List (multiple choices)]" = NGN )

This will fetch issues from project ATWP, that have title group of TNL or NGN (including when both are set), and have the team set to one of the two "do not use" values.

I would simplify that further:

project = ATWP

AND ( "Relevant Analytics Team[Select List (multiple choices)]" in ("Do Not Use - Content Analytics", "Do Not Use - Marketing Analytics" ) )

AND ( "Title Group[Select List (multiple choices)]" in (TNL, NGN) )

Rocsana Chereches
Contributor
June 29, 2022

Thank you Nick!

My JQL is not at all advanced hence why I could not get what I wanted out of the query...makes sense the way you explained it, thanks so much!

 

Rocsi

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