A number of our Jira issues include comments where the commenter used the (x), (!), (?), (i), and (/) icons within the body of the comment. We would like to be able to build a filter to find only issues with comments that include one of those icons. I've tried the obvious JQL searches like comment ~ "(/)" or comment ~ "(?)", etc... with varied results depending on the symbol used. for example, i don't get an error using x, i, or / but the search doesn't find the right issues. if I use ? or !, it fails altogether. Any recommendations?
Hello Devon,
Welcome to Atlassian Community!
As you can check in the documentation below, you can use \\ to escape special characters in a JQL search:
- Search Syntax for Text Fields
That been said, let's suppose you would like to find all the issues that are commented with the (x) icon. The query below should work for you:
comment ~ "\\(x\\)"
Please, let me know if this information helps.
Thanks for the quick response, Petterson. Doesn't seem to be working for me though...
For example, there are several issues with the (!) icon in use. Here's an example where I added a comment to an existing issue for testing purposes:
I tried advanced search using
comment ~ "\\(\\!\\)"
which should have pulled up several issues, including REQ-251 shown above but resulted in "No issues found":
I also tried basic search using the single \ as suggested in the link you provided but that didn't work for me either.
Thoughts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I should mention, I did try it exactly as you suggested with
comment ~ "\\(x\\)"
Which does indeed find a number of issues. Specifically, the JQL query found 78 of them in the current project:
However... i think that's just because the x isn't a special character. When I search using only
comment ~ x
I still get the same 78 issues:
But when I replace the x with \\! or \\?, i get nothing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Devon,
Thank you very much for your answer.
Analyzing the information you provided and digging a little bit further in our documentation, I was able to find out that indeed this search is not working as documented in this article.
In fact, the search I've sent to you works because x is not a special character, just like you correctly mentioned. When using special characters, it does not work.
A bug was already raised about this behavior:
JQL queries with special characters returns incorrect results
Our developers have decided to change it to a suggestion and open another suggestion to update our documentation since it is working as designed, although it's not working as documented and as the customers expected.
I understand how this decision may be disappointing to you, Devon.
Please, vote and watch the suggestion above in order to change the search way as documented now, using the // to escape special characters. Also, feel free to give your feedback on that.
For more information about why our developers have decided to raise it as a suggestion and not as a bug, check the report below:
- https://jira.atlassian.com/browse/JRASERVER-40790
Please, let me know if this information answers your questions.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.