JQL field option suggestions fail when custom field has an ampersand '&'

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      When a field has an ampersand '&' the API used to fetch field suggestions fails to return any results as it does not encode the '&' properly. 

      Example field name: "Multi choice select&list"

      URL constructed for suggestions: https://site.atlassian.net/rest/api/latest/jql/autocompletedata/suggestions?fieldName=Multi%20choice%20select&list[Select%20List%20(multiple%20choices)]&fieldValue=a 

      Note the '&' after "select" and before "list" in the above URL is not encoded, thus is interpreted as a parameter separator, instead of the actual character.

      Steps to Reproduce

      1. Create a custom field with a '&' character
      2. Use Advanced JQL search and notice suggestions for custom field options fail

      Expected Results

      Ampersands should be encoded properly so proper field value suggestions are returned

      Actual Results

      Ampersands are not properly encoded, return object will always be an empty array

      Workaround

      Remove ampersands from custom field names

              Assignee:
              Unassigned
              Reporter:
              Steven Hansen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: