I'm trying to use the ~ operator as per https://confluence.atlassian.com/jira/performing-text-searches-185729616.html
The description in my test issue is one line like this:
It contains ABC=someWord_and_these_TOKENS and other text too.
Now if I search with:
project = "GMX" AND Description ~ "ABC=someWord_and_these_TOKEN"
it finds my test issue. On the other hand, these do not work:
project = "GMX" AND Description ~ "ABC=someWord_and_these_TOKE"
project = "GMX" AND Description ~ "ABC=someWord_and_these_TOKE?"
project = "GMX" AND Description ~ "ABC=someWord_and_these_TOKE*"
project = "GMX" AND Description ~ "ABC=someWord_and_t?ese_TOKENS"
This seems baffling - these are pretty close to the examples in the documentation.
Version: Atlassian JIRA Project Management Software (v7.1.2#71006-sha1:8e7e309)
Hi Dan,
JIRA search will remove the underscore (_) character and will treat it as a whitespace https://jira.atlassian.com/browse/JRA-32441 https://jira.atlassian.com/browse/JRA-5567 so when you're searching for
"ABC=someWord_and_these_TOKE" for example it will try to find an issue that contains all the words - ABC=someWord, and, these, TOKE and will probably actually ignore and word https://confluence.atlassian.com/jira/performing-text-searches-185729616.html#PerformingTextSearches-Reservedwords
You can search for an exact phrase you need to quote the phrase like that "\"ABC=someWord_and_these_TOKENS\""
Also in some cases and might be considered as a boolean operator https://confluence.atlassian.com/jira/performing-text-searches-185729616.html#PerformingTextSearches-Booleanoperators
So it's a bit complicated as the text you're searching is actually split into phrases and a lot of rules apply.
Would you tell us what's the exact use case i.e. when having this phrase or similar "ABC=someWord_and_these_TOKENS and other text too" - what do you want to search for , so we can figure out the correct way to do that via JQL?
As a workaround you may consider using the Script Runner JQL function issuefieldmatch which allows you to match field value using regular expression and I think this will be much more reliable than the JIRA fuzzy search in this case where you've got special character to match.
https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_issuefieldmatch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for an excellent explanation - looks like the underscores are to blame. My use case is in fact that I have to match the exact word (with underscores) - it is the formal name of a test - so the exact phrase matching looks like a solution even if the syntax is a bit clunky.
I'll take a look at issuefieldmatch too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. I removed the and part of the token, to avoid confusion (and my use case will not have any ands in it). Also reduced to searching for the part after the =. However, the problem persists even if I quote the phrase, i.e.:
"\"someWord_these_TOKENS\""
..matches, whereas any partial or wild-carded version does not match. So I think the fuzzy search is just not going to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having exactly the same issue with the same use case, I'm searching for a Test Case name which contains underscores in the contents of a text field.
I still don't understand how can JIRA have such a poor search engine. I mean, JIRA is normally used by developing teams, searching for words with underscores is just a part of every developer's daily life.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
I also ran into the same issue, but it's saying that the operator isn't supposed by the field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also having a lot of frustrations with searching issues that have underscores in issue description.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I did ran in the same topic with the requirement to search for an text containing several underscores.
I also tried the descripted escaping "\"someWord_these_TOKENS\"" with no result.
Are there any updates, additional infos available how to overcome this problem?
any help is appreciated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anything particular in them? They look like the standard information about searches, can't find anything that indicates that there should be something non-standard about my syntax?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dan,
Maybe this will help you:
https://confluence.atlassian.com/jiracorecloud/advanced-searching-765593707.html
https://confluence.atlassian.com/jiracorecloud/search-syntax-for-text-fields-765593720.html
Regards,
Lameck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.