Forums

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

Can anyone explain this counterintuitive query?

Rob Dawley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 18, 2018

Hi All,

 

When searching by a Summary field in our Jira instance, if I search for a particular type of summary, say "UK2" I get everything but "UK2" results.  A slightly different query.."UK3".. strangely gives me the UK2 results.  Can anyone explain why this might be the case?

UK2_query_shows_UK3_results.JPGUK3_query_shows_UK2_results.JPG

3 answers

1 accepted

1 vote
Answer accepted
Payne
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.
December 18, 2018

The hyphen between DC and UK2/UK3 is being interpreted by JQL as "exclude term", so "DC - UK2" will return matches without UK2, and "DC - UK3" will return matches without UK3. You can omit the hyphen and search for summary ~ "DC UK2 Temporary Data Centre Access Request" to get what you seek.

https://confluence.atlassian.com/jiracoreserver073/search-syntax-for-text-fields-861257223.html#Searchsyntaxfortextfields-Excludedterm:-

0 votes
Rob Dawley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 18, 2018

Thank you, omitting or escaping the "-" works as expected.

0 votes
Vasiliy Zverev
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.
December 18, 2018

Dear Rob!

There are two notes about:

first, you ordered query by creation date, so it could couse some confise

second: ~ means that you will get something like serached string, not exact match.

Best regards,

Vasiliy.

Suggest an answer

Log in or Sign up to answer