How do you do a JQL search using the ~ operator for the literal string "NO_SOD"? When I try text ~ "NO_SOD" I get issues which have NO and/or SOD.
you need to do an exact match I believe. see if this document help - advanced-searching-operators-reference. I have had mixed luck w/ this TBH. if i get a minute I will give your UC a try.
I've looked at the link you posted. Issue is that text ~ "NO\_SOD" is not valid. You get the error "Error in the JQL Query: '\_' is an illegal JQL escape sequence. The valid escape sequences are \', \", \t, \n, \r, \\, '\ ' and \uXXXX. (line 1, character 11)"This seems like a bug. I'll probably report it to Atlassian so they can ignore it for 7 years.
yep, like I said mixed luck for me too. it might be that I'm using incorrectly or just limitations. I will ping other champions to see if they want to test their Jedi-JQL skill on this. It wouldn't hurt to create a support ticket. While it may not result in a 'fix' maybe a clear answer which would be good to post back here.
Hi @Benjamin Peikes,
are you on cloud or on server?
I just tried this on server and I have one issue having only NO in the summary, one with SOD and one with NO_SOD.
If I search for summary ~ "NO_SOD" I get only the one issue with NO_SOD, also with text ~ "NO_SOD"
On Cloud, it behaves different.
I just created the same issues, and when I search for "NO_SOD", I get the issues with NO_SOD and SOD, but not the one with NO.
Kinda weird.
Just tried to search for "NO?SOD" and thought, there can be only one result, but I get a lot of different results, containing not even NO and/or SOD.
Maybe this is also related with https://jira.atlassian.com/browse/JSWCLOUD-16529
I have found that underscores and dashes tend to mess up searches. In fact there is a bug ticket for this JRASERVER-31882. If you have ScriptRunner you can do this ...
issueFunction in issueFieldMatch("", "summary", ".*NO_SOD.*")
Also according to JRASERVER-6218 Jira 8.0 will support regex searches natively so you should be able to do this soon-ish ...
summary ~ "/.*NO_SOD.*/"
I won't hold my breath. Atlassian's work around is to recommend using ScriptRunner. I'm not sure why Atlassian doesn't just buy that company and integrate their tools directly into Jira.
Actually, I just re-read the second issue (JRASERVER-6218) and it looks like they had to back out regex searching in Jira 8.0. But if you happen to have ScriptRunner you could still do it that way.
It looks like you're new here. Sign in or register to get started.