Using the ~ (CONTAINS) operator in Advanced Search via JQL that includes an underscore _ character returns more results than expected

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 11.3.7
    • Affects Version/s: 11.2.0, 11.3.2, 11.3.4
    • Component/s: JQL Search
    • None
    • 11.02
    • 6
    • Severity 3 - Minor
    • 12

      Issue Summary

      Using the ~ (CONTAINS) operator in Advanced Search via JQL that includes an underscore _ character returns more results than expected

      Steps to Reproduce

      1. Confirm that Jira is using Lucene and not OpenSearch.
      2. Create a SCRUM sample project to create issues to test with.
      3. Create an issue that includes string “Task_Status_Scrum_Master”
      4. Use the following JQL via Advanced Search:
       text ~ "Task_Status_Scrum_Master" 

      Expected Results

      JQL search returns only issues that have the string “Task_Status_Scrum_Master”.

      Actual Results

      JQL search returns all issues that include strings, such as “Task”, “Status”, “Scrum”, “Master”, and “Task_Status_Scrum_Master

      Workaround

      When constructing new JQL queries, add escaped quotes to the search text, for example:

        text ~ "\"Task_Status_Scrum_Master\""

      Escaped quotes are not automatically added in previously saved JQL queries, which can lead to different search results if Jira has been recently upgraded.

              Assignee:
              Hendry Luk
              Reporter:
              Adrian Castillo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: