I need a simple solution for a JQL
eg:
issuetype = Bug AND text != Apple
the != operator is not supported with text search.
You can get all issues that do not contain the word 'Apple' by following these steps:
After that, you'll get the list of issues that do not contain the word 'Apple'.
Do you want to match the exact text ? If not then you can use the contains (~) and in your case can be does not contain (!~)
issuetype = Bug AND summary !~ "*On Production*"
Try with 'text' instead of summary, as I can't test now if it works as well.
Thanks, but no. Text does not accept != as an operator.
?? Opposite of my need. Using ~ would result in what issues I do not want to see.
If I have 100 cake recipes, of many various kinds, but hate Apples and don't want to see any of the recipes that include the use of Apple.
examples:
~ Apple = show me recipes (issues) with Apple in them
!~ Apple = do not show me recipes (issues) with Apple in them
I want a JQL for the latter of these examples.
Dave, !~ is different from !=
Thanks! !~ works perfectly.
what is the JQL i have to user if i need exact text? Using ~ symbol it returns all issues that has the particular search string. But i need only those issues that are exactly match to the search string.
Can confirm Ignacio Pulgar [Tecnofor]'s comment, this is an acceptable solution for searching "Does not contain this text". I do not know why, but it seems that the !~ operator does not work for text.
As a note to this solution, you will likely have to include the majority of your search in the second query, see below example as an explanation.
You run a bakery and track your recipe creations in JIRA. The project is MyBakery, your epics are a custom issuetype called Recipe, and you want to find all of your recipes that do not contain Apples.
This will return all of your project specific recipes that include the word apples.
project = MyBakery AND issuetype = Recipe AND text ~ Apples
Save this as a filter, for this example, the filter name is 100.
In a new query, you can write...
filter != 100
This will return EVERYTHING in JIRA that is not in that filter. So to have it specific to your search you would rewrite the first half of your first search.
project = MyBakery AND issuetype = Recipe AND filter != 100
This will return all of the appropriate items that are not including the text Apples.
Additionally, you can add multiple text options to mask out. If you had a customer who was allergic to Apples and Bananas, you could put in the first query
project = MyBakery AND issuetype = Recipe AND text ~ "Apples OR Bananas"
Your JIRA version will dictate the correct syntax, see https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-i-use-the-like-operator-with-the-List-of-values-in-Jira/qaq-p/545519 for reference.
You can use the "Power JQL" app - https://marketplace.atlassian.com/apps/1216891/power-jql-extended-search-functions?hosting=server&tab=overviewWhich provides the ability to search by text fields using regex.A few examples:issue in powerIssue("project = SD", "summary,description", "^ABC-.*")issue in powerIssue("project = SD", "text", ".*(bug|test).*") - for search by summary, description, comments.
Thank you so much for writing this comment it has helped me end my search for the answer!
Edited:
The NOT keyword doesn't work with text:
NOT text ~ apple
Neither this other equivalent syntax:
!text ~ apple
For me, either of those syntaxes always makes the search just return zero results -- even though the non-negated version of the search shows that only about 100 of our 10,000+ issues contain the string I'm trying to include.
Have just tried this query both in Cloud and Server 8.6.1 and the NOT and ! syntax do not work with text. Should have tried it before posting this answer.
Have just unaccepted this answer.
Please, refer to the new answer marked as accepted.
Saving filter for each search keyword is not a practical solution, there has to be a better way.
The real answer here is to put better data in - this is a clumsy search, and is nowhere near as flexible as you would like, but I would ask why you are trying to do searches like this?
The answer is probably "we didn't put the right data in the issues that would enable us to do sensible searches"
I think many attempts here are correct.
However for me there was an important detail missing (-> the wildcards):
issuetype = Bug AND text !~ Apple
did not work for me; however:
issuetype = Bug AND text !~ '*Apple*'
did work.
It looks like you're new here. Sign in or register to get started.