Forums

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

JQL search includes values that i have specifically excluded

Tobbe Wilson May 13, 2020

Hi,
Hoping for some help from the experts...

What i would like to find is all tickets which have either of the two stated Transports below, and are on any Platform except 1.

My query currently gives me all Platforms, 1, 2 and 3


The query looks like this:
project = "IIC"
AND Platform != "1"
AND "Transport - IN" = "SOAP"
OR "Transport - OUT" = "SOAP"
OR "Transport - IN" = "REST"
OR "Transport - OUT" = "REST"
ORDER BY Platform DESC

What am i doing wrong?

2 answers

2 accepted

2 votes
Answer accepted
Jack Nolddor _Sweet Bananas_
Atlassian Partner
May 14, 2020

Probably you need to use ( ) to group all OR clasures as shown below:

 

project = "IIC" AND (Platform != "1" OR Platform IS EMPTY) AND ("Transport - IN" IN ("SOAP", "REST") OR "Transport - OUT" IN ("SOAP", REST)) ORDER BY Platform DESC

 

Regards

Tobbe Wilson May 14, 2020

Thanks , that worked!

0 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.
May 14, 2020

When you translated your question into a query, you dropped all the grammar that enables it to be understood as you intended.

Punctuation really is a lot more important than you think (my favourite example of why it  matters - "Let's eat, Grandma" vs "Let's eat Grandma" - it really is important to get it right...)

When you've worded your query, you've punctuated it in your head, but you have not told the computer what you actually mean.  What you've written, rephrased back into natural English is "Show me issues where the project iic, the platform is not 1 and transport-in is soap, and issues where transport-out is soap, and issues where transport-in or transport out are rest".

I think that what you probably mean is

project = "IIC" AND Platform != "1" AND ( "Transport - IN" = "SOAP" OR "Transport - OUT" = "SOAP" OR "Transport - IN" = "REST" OR "Transport - OUT" = "REST")

Tobbe Wilson May 14, 2020

Hmm?

How can and "OR" be interpreted as "AND"? Is that du to the non-grouping?

"Show me issues where the project iic, the platform is not 1 and transport-in is soap, and issues where transport-out is soap, and issues where transport-in or transport out are rest".

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events