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

JQL in REST API call fails when a space (%20) precedes a hyphen in the text search, even if correctly encoded.

XMLWordPrintable

      Issue Summary

      The JQL passed in the rest API endpoint Search for issues using JQL enhanced search (GET) is not processed correctly when the encoded URL contains a space (%20) before a hyphen -

      Steps to Reproduce

      1. Create a new issue
      2. Write a summary where there is in hyphen between 2 texts, example Test summary with hyphen - email@email.com
      3. Search from UI (Filter all issues) with JQL: summary ~ "Test summary with hyphen - email@email.com"
      4. Take from the browser the encoded URL: will be:
      • ?jql=summary%20~%20"Test%20summary%20with%20hyphen%20-%20email%40email.com"

        and paste in the rest API call endpoint

      FYI It will be the same behavior if you will use the description field instead of

      Expected Results

      To have listed in the rest API response same as UI

      Actual Results

      rest API call gives 200 codes but no data

      Workaround

      Remove the %20 before the hyphen in the JQL section of the API request.

      Example: 

      • restAPI not working:
        https://yoursite.atlassian.net/rest/api/2/search?jql=summary%20~%20"Test%20summary%20with%20hyphen%20-%20email%40email.com"
      • restAPI is working (Removed the %20 before the hyphen symbol {-})
        https://yoursite.atlassian.net/rest/api/2/search?jql=summary%20~%20"Test%20summary%20with%20hyphen-%20email%40email.com"

       

              Unassigned Unassigned
              ff9290320c00 Adriano Garruba
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: