Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does JIRA have not like?

陈思远
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!
May 18, 2022

Hello,

How can I use not like "blocking" similar to SQL

I need to remove the problem of "blocking" keyword in a field through advanced search function. How should I use it?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 19, 2022

Welcome to the Atlassian Community!

I am not too sure that I understand the question, but I think it is about searching text fields?

Jira uses "contains" (which I think is not the best word in English to describe what it does) for text fields, and that is represented with the ~ symbol.

So the query summary ~ penguin will return all issues with the word "penguin" in the summary.  It is a somewhat fuzzy search, and it pretty much ignores punctuation and numbers, more here: https://support.atlassian.com/jira-software-cloud/docs/search-syntax-for-text-fields/

One of the problems with that though is that text might contain things that search definitions also use, including spaces.  While summary ~ penguin is ok, summary ~ Emporer penguin will fail, because, after Emporer, the search is expecting an operator next, not penguin.  To fix that, we quote - summary ~ "Emporer penguin"

It's similar for key words.  summary ~ and is going to fail because and is a search operator, and it's not just search terms that will make it fall over.  Again, the fix is quoting it.

Basically, summary ~ "thing to search for" is what you need.

I've used summary because it's a text field I can guarantee you are using, but it's the same for all text fields, even comments.  There is also a trick - you can use text ~ "thing to search for" to search all the text-based fields for an issue!

 

And then the "not" part of the question - you can invert any search with ! - summary !~ "thing to search for" will list all the issues that do not have the search text in them.

Be careful with ! though.  "Not X" is not the same as "list everything and remove everything matching X"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events