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

JQL contains search for a word with hyphen (-) provides incorrect results

    XMLWordPrintable

Details

    Description

      Summary

      Jira creates tokens when searching for text fields.
      For a case like A-B-C Jira can create three different tokens or Jira can keep these three words as only one token. The same behavior happens for the pattern A-B, where sometimes creates two separated tokens and other times creates only one token.

      Since Jira will try to match the words used on the JQL with each token, and Jira can create tokens differently in each case, that's the reason why sometimes a JQL works for one case but not for another case.

      Update (April 26, 2021)

      Any custom Text Type custom field also is affected.

      Update (April 3, 2020)

      Summary search is affected as well.

      Searching for !~ is also impacted:

      • Issues with summary: something, test - test, test;
        JQL Result
        summary !~ "test - test" returns all issues
        summary !~ "test"

      Environment

      • JIRA Cloud

      Steps to Reproduce

      1. Create New project
      2. Create test tickets
        • Description: release-abc
      3. Go to issue navigator: https://<EXAMPLE>.atlassian.net/issues/?jql=
      4. Conduct the following test using Advance JQL
      JQL Result
      description ~ "release-abc"
      description ~ "-abc
         
      description ~ "abc"
      description ~ "release"
      description ~ "release-"

       = Issue not found
       = Issue found

      Expected Results

      • Find issues with description matching the JQL

      Actual Results

      • Two scenarios where results did not populate correctly

      Notes

      • Quick Search also displays same results:
        • https://<EXAMPLE>.atlassian.net/secure/QuickSearch.jspa?searchString=release-abc > 

      Workaround

      • Using specific text search might work for some cases:
        • summary ~ "\"test - test\""
        • summary !~ "\"test - test \""
          It does seem inconsistent sometimes even with an exact search.
      • Also changing the Indexing Language under System Settings to English - Moderate Stemming seem to help.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jromero@atlassian.com Jose R. (Inactive)
              Votes:
              33 Vote for this issue
              Watchers:
              59 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: