Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
4
-
2
-
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
- api/2/issue/<issueIdOrKey>/editmeta
- rest/api/2/field
Attachments
Issue Links
- was cloned as
-
JRACLOUD-71606 REST API: Allow to use name of Custom Fields
- Closed