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

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

XMLWordPrintable

    • 0
    • 3
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      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.

      This is expected but undesirable behaviour, documented here: https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-using-the-text-field/

      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.

      Further discussion on this functionality here.

      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:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: