Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,547
Community Members
 
Community Events
165
Community Groups

Why does the JQL contains operator (~) on description field Return Non-Matches?

Hi, 

I have a user trying who is running a JQL query similar to the one below, and it returns 121 Issues it says contains the search string, but many of the 121 issues do not have the actual search string in them. Anybody have an idea why it's doing this?

Syntax used: 
Description ~ "When going to the golf tab"

Thanks in Advance!

2 answers

2 accepted

2 votes
Answer accepted

I suspect it's because ~ is actually a fuzzy search, not an exact one.

If you could give us some text that you think it should not have matched, we may be able to explain!

Hi @Tommy Augustine 

Yes, and...to Nic's answer, when you want an exact phrase match, you need to escape an extra set of quotation marks, as shown here:

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-CONTAINS-CONTAINS--

Kind regards,
Bill

Like Tommy Augustine likes this

  Thank you guys for the additional help!

Like Bill Sheboy likes this

Sharing Official Answer from a high-speed Atlassian Support Engineer:

The Description field, along with many of the Jira text fields, leverage the tilde operator as a fuzzy search in order to pull results that are "about the same" as the query. However, in the example that you provided, we're also encountering a few words that are on the Reserved words list:

https://support.atlassian.com/jira-software-cloud/docs/search-syntax-for-text-fields/#Searchsyntaxfortextfields-reservedReservedwords 

If the other JQL query is attempting to leverage words from the Reserved words table, those words will be dropped and ignored from the final JQL query. In the example you provided, Jira will be searching for any issues with a Description field containing the words "going loan lab", since the words when, to, and the are reserved words.

This does make searching through text fields in Jira trickier, since the displayed results might not cover every word. We have an active Feature Request regarding exact JQL searches, and I'll link it below:

Allow exact-text searching in JQL: https://jira.atlassian.com/browse/JRACLOUD-21372

I'll also link this support ticket to the above Feature Request in order to track the impact and interest from you and your team.

==========================

In the comments for the above link, users do mention a workaround using a third-party Marketplace apps to perform an exact search on a Jira site:

JQL Search Extensions:  https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira?hosting=cloud&tab=overview

==========================

Ideally, there should be a native function to perform JQL searches, but with the Feature Request above being the ultimate answer to including this functionality it's up to the developers to continue investigating this feature. For a more short-term solution, the JQL Search Extensions plugin above might help you and your team perform more direct searches through your Jira issues.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,458 views 37 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you