Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-72895

JQL search against text fields for phrases with minus "-" character will not return issues that should match

XMLWordPrintable

      Issue Summary

      When running a search against text fields that contain strings with dash/minus sign "-", you can get some strings which will not be found, where other strings with the same format will be found.

      Steps to Reproduce

      1. add the string "us-west-2_36500c92-9241-44de-b909-a74c0d8d4cee" to any text field, the description, or a comment.
      2. Search for that exact string using the
        field ~ "us-west-2_36500c92-9241-44de-b909-a74c0d8d4cee"

        or

         text ~ "us-west-2_36500c92-9241-44de-b909-a74c0d8d4cee"

        the issue will not be returned.

      3. compare this bevaior to the same process but with this string: "us-west-2_d50992f2-d152-43e3-988d-82fbc3ca7341". This string will return the issue when searched for.

      Expected Results

      • Either both strings will return their respective issues, or neither string will return their respective issues.

      Actual Results

      "us-west-2_36500c92-9241-44de-b909-a74c0d8d4cee" returns no results.
      "us-west-2_d50992f2-d152-43e3-988d-82fbc3ca7341" returns issues that match.

      Notes

      substrings of those strings will not match, even when wildcards are used.

      Workaround

      Use strings with no "-" or "_" to ensure a match, or surround the phrase with quotation marks (e.g.

      text ~ "\"Test_1234_Test - Time\""

      ), or cite the minus character with double slashes (e.g.

      text ~ "Test_1234_Test \\- Time"

      ).

              Unassigned Unassigned
              jlong@atlassian.com Jared Long
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: