Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Contains text search to look for text that contains a "-"?

Elicia Syson March 13, 2017

I am using JIRA v7.1.7

Issues->Search for Issues->Contains text doesn't find all issues that contain text when the text is part of a hyphenated word.

For example, if I search for 1553, the issue that contains ICD-1553 in the summary doesn't show up.

I am presuming it is the hypen that is causing this. Is there a way to search that include hyphenated words?

I need to be more explicit in my question.

When I search for 1553, all the issues show up for 1553, except for any containing a "-".

For example the search finds issues with "1553", "1553B", "IF 1553B", but issues containing MIL-STD-1553B do not show up in the search, nor does any with a special character. It seems logical to me that these should show up in the search too. How else is a use supposed to know they even exists, without looking through all the issues.

1 answer

1 vote
Tarun Sapra
Community Champion
March 13, 2017

Hello Elicia,

 

Your requirement is searching based on substring as "1553" is the sub-string of "ICD-1553" , this feature request is closed by Atlassian - https://jira.atlassian.com/browse/JRA-6218 

But JIRA JQL does support searching for strings containing special characters using escape characters - https://confluence.atlassian.com/jiracoreserver073/search-syntax-for-text-fields-861257223.html#Searchsyntaxfortextfields-escapingEscapingspecialcharacters:%5Cor%5C%5C 

Elicia Syson March 13, 2017

Thank you, but this doesn't quite help me. I expanded question above, could you please look at it?

Niclas Sandstroem
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2017

Elicia try advanced search JQL:

text ~ "MIL\\-STD\\-1553B"

That is what Tarun tried to communicate with the documentation he provided. So basically we are escaping twice here for some reason and Atlassian has probably built in that to not conflict with normal issue key search. Example PROJA-123

Tarun Sapra
Community Champion
March 13, 2017

Hello Elicia,

Thanks for updating the description, now it's more clear. As Niclas suggested, if you are trying to find "MIL-STD-1553B" then you can use advance JQL using escape characters since "MIL-STD-1553B" is a complete string but if you try to search based on sub-string like "1553B" and expect issue containing "MIL-STD-1553B" in search results then that's not possible currently. 

Elicia Syson March 13, 2017

Thank you for all your help.

Suggest an answer

Log in or Sign up to answer