JQL Searching for issues with comments with particular "icons"

Devon Campbell January 4, 2019

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?

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 4, 2019

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.

Devon Campbell January 7, 2019

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:

Screen Shot 2019-01-07 at 8.33.31 AM.png

 

I tried advanced search using

comment ~ "\\(\\!\\)" 

which should have pulled up several issues, including REQ-251 shown above but resulted in "No issues found":

Screen Shot 2019-01-07 at 8.32.30 AM.png

 

I also tried basic search using the single \ as suggested in the link you provided but that didn't work for me either. 

Thoughts?

Devon Campbell January 7, 2019

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:

Screen Shot 2019-01-07 at 8.45.30 AM.png

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:

Screen Shot 2019-01-07 at 8.45.48 AM.png

But when I replace the x with \\! or \\?, i get nothing. 

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 7, 2019

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.

Suggest an answer

Log in or Sign up to answer