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

Add "=" operator for JQL operations using text to return only exact match and exclude additional results

    • 11
    • 14
    • 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

      JQL should have the option to filter for a strict exact match for text operations. Currently, the exact match will return all issues containing that exact phrase/word, however, we currently don't have a way to return only issues with that specific word, excluding any other results with extra wording.

      Expected Results

      Let's assume I have a short text Custom Field called "ABC", and I want to filter exclusively for issues with "BCA" result set for this Custom Field.

      If I try to filter using:

      "ABC[Short Text]" ~ "\"BCA\""
      

      Although the exact match will return all issues containing the exact word "BCA", it will also return issues containing any phrases with "BCA" such as "1 - BCA", "BCA - 2", or ".....BCA.....".

      Some customers would benefit from having the option to filter exclusively for the strict match "BCA", and exclude all other matches with additional wording.

      Actual Results

      Currently, this query will return every issue containing "BCA" word, however, we should offer the option to filter strictly for "BCA" exact match, excluding any matches with additional wording.

      Workaround 1

      In case you are dealing with a limited amount of data, and your text field is not actively updated, you can always opt to utilize the following option as a workaround:

      This way you can apply for example the following JQL:

      "ABC[Short Text]" ~ "\"BCA\"" AND "ABC[Short Text]" ~ "-Unwanted -Word -EFG -HIJ"

      So in case you had an unwanted output "BCA EFG", as you have Excluded it explicitly, this result wouldn't be returned.

       

      Workaround 2

      In case the customer has ScriptRunner, they can opt to utilize the following function:

      issueFunction in issueFieldExactMatch(subquery, fieldName, regularExpression)
      

            [JRACLOUD-81881] Add "=" operator for JQL operations using text to return only exact match and exclude additional results

            Any update on this one. From the original posts in 2023 this isn't working and as of today it still isn't. Is there a solution as I have a customer I really need to put an exact match check in place for.

            Steven Lees-Smith added a comment - Any update on this one. From the original posts in 2023 this isn't working and as of today it still isn't. Is there a solution as I have a customer I really need to put an exact match check in place for.

            Andrea Monico added a comment - - edited

            +1

             

            In our case the unwanted words contains a space after the search string.

            I thought I could write something like

            "MyCustomeField[short text]" ~ "\"SearchString\"" AND "MyCustomField[Short text]" !~ "\"SearchString \"

            But Jira is trimming the trailing space. Why?

            Andrea Monico added a comment - - edited +1   In our case the unwanted words contains a space after the search string. I thought I could write something like "MyCustomeField[ short text]" ~ "\" SearchString\ "" AND " MyCustomField[ Short text] " !~ " \ "SearchString \" "  But Jira is trimming the trailing space. Why?

            We also need this feature - finding exact matches on e.g summary is a requirement for an automation rule that we are writing, and using the ~ finds too many similarly named issues.

            Chris Rosendorf added a comment - We also need this feature - finding exact matches on e.g summary is a requirement for an automation rule that we are writing, and using the ~ finds too many similarly named issues.

            We could really do with having this feature!

            Alice Barrow added a comment - We could really do with having this feature!

            +1

            +1

            +1

            +1

            Rodrigo Kondo added a comment - +1

            +1

            This is a must have feature!

            Rodrigo Kondo Fernandes added a comment - This is a must have feature!

              Unassigned Unassigned
              fb70dbb86db0 Antonio Carlos
              Votes:
              21 Vote for this issue
              Watchers:
              27 Start watching this issue

                Created:
                Updated: