Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-62343

REST API: Allow to use name of Custom Fields

    XMLWordPrintable

Details

    • 4
    • 2
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              69 Vote for this issue
              Watchers:
              40 Start watching this issue

              Dates

                Created:
                Updated: