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?
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.