REST API: Allow to use name of Custom Fields

XMLWordPrintable

    • 4
    • 6

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Problem Definition

      Currently REST API for edit issue and similar requires field_id as a parameter.
      Eg:

      curl -v -upass:pass -X PUT -H 'Content-Type:application/json' -d '{"fields": { "customfield_11000": "1" } }' http://127.0.0.1:8080/rest/api/2/issue/PRG-11
      
      < HTTP/1.1 204 No Content
      

      And using CustomField name doesn't work:

      curl -v -upass:pass -X PUT -H 'Content-Type:application/json' -d '{"fields": { "readonly-fields": "1" } }' http://127.0.0.1:8080/rest/api/2/issue/PRG-11
      
      < HTTP/1.1 400 Bad Request
      {"errorMessages":[],"errors":{"readonly-fields":"Field 'readonly-fields' cannot be set. It is not on the appropriate screen, or unknown."}}
      

      Suggested Solution

      Allow using CustomField name as a parameter for REST API calls.
      This will allow the sharing of any REST API call across any platform as soon as same CustomField exist into these platforms.

      Workaround

      Use REST API call to get the mapping

            Assignee:
            Unassigned
            Reporter:
            Andriy Yakovlev [Atlassian]
            Votes:
            68 Vote for this issue
            Watchers:
            39 Start watching this issue

              Created:
              Updated: