-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Work Item - Search - Backend - JVIS
-
None
-
2
-
Severity 3 - Minor
Issue Summary
Using JQL / search CONTAINS ("~") for a word that starts with a hyphen ("-") or underscore ("_") results incorrect results
Steps to Reproduce
- Run a JQL search for a specific project and see how many issues are returned.
- Add:
summary ~ "-something"or
summary ~ "_something"
Expected Results
Only issues with "-something" are returned, or alternatively, if using hyphen at the start of the string is not supported, an error message is displayed.
Actual Results
All issues in the project are returned.
![]()
Notes:
- Using "-x" or any other letter combinations instead of "-something" gives the same result:
- Using numbers instead of letters does seem to give different( although still incorrect) results:
- Using just a hyphen as the only search term does give an error stating "Unable to parse the text '-' for field 'summary'."
Workaround
- Avoiding hyphens at the start of a "CONTAINS" search, although the risk of this behavior is that it gives incorrect results without any indication, and it can easily mislead users with the results.
- Using Exact phrase search seems to a void this behavior, as it ignores hyphens, for example this would return no issues (unless there is a specific issue with the word "something" on its own:
project = SCRUM01 and summary ~ "\"-something\""