JQL - Does not contain operator (!~) usage

Raj Vora
Contributor
October 3, 2018

I am trying to use the Does Not Contain operator to identify any issues in my entire JIRA instance where the Summary does not contain the word "411";

So my JQL statement I use is (summary !~ "411"), while this seems straightforward, the search still generates results that have the "411" string in the summary.

I read the advanced searching page here:

https://confluence.atlassian.com/jira064/advanced-searching-720416661.html#AdvancedSearching-KeywordsReference-DOES_NOT_CONTAIN

but can't find any solutions.  What am I missing/overlooking?

 

Thanks.

3 answers

1 accepted

6 votes
Answer accepted
Mahesh Patel
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!
November 1, 2022

Try this one

!(summary ~ "(411)")

Raj Vora
Contributor
February 13, 2023

Yes, this works!  Thanks.

Like # people like this
Phil Bustin
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.
April 1, 2024

This isn't working for me: !("SBM Tracking No" ~ "K")

1 vote
Amir Katz (Outseer)
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.
August 26, 2019

See the answer by Ignacio Pulgar (May 9, 2018) in this thread:

https://community.atlassian.com/t5/Jira-Core-questions/Search-for-issues-that-do-not-contain-text/qaq-p/455633

The secret ingredient is how to use the filter:

<some-criteria-here> AND FILTER NOT IN (<filter-ID>)

Definitely counter-intuitive IMO...

0 votes
Alexey Matveev
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.
October 3, 2018

Hello,

What is your Jira version? I just tried on Cloud and it worked.

Raj Vora
Contributor
October 3, 2018

JIRA v7.5.2 (Server)

Alexey Matveev
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.
October 3, 2018

Try to query like this:

summary !~ "411*"

Like # people like this
Raj Vora
Contributor
October 3, 2018

unfortunately that doesn't fix it either; not sure if it has to do with the fact that I am searching based on numbers

Alexey Matveev
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.
October 3, 2018

Could you give me examples of issues which you can see, but they should not be selected?

Raj Vora
Contributor
October 3, 2018

The summary for a few issues that appear in the search results but should not:

Issue 101 - 85411 - Something is wrong
Issue 102 - 85411 - Something is wrong again
85411 - Something is still wrong

Alexey Matveev
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.
October 3, 2018

That is right. You are not able to filter these issues out because Jira looks from the beginning of the words in the summary field.

For example 

Issue 101 - 41123434 - Something is wrong

would work.

Suggest an answer

Log in or Sign up to answer