Details
-
Bug
-
Resolution: Timed out
-
Low
-
Severity 3 - Minor
-
Description
Issue Summary
The GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field JSM REST API endpoint is only returning the default value for “multi choices” fields (e.g. select fields, check-boxes and radio buttons), while it is NOT returning the default value for the other fields, like:
- Number Field
- Date Picker
- Date Time Picker
- Labels
- User Picker (single user)
- User Picker (multiple users)
- Text Field (single line)
- Text Field (multi-line)
- URL Field
Steps to Reproduce
- Create different kind of custom fields (e.g. check boxes, number field, radio button, URL field, etc) and make sure to set a default value for each of them.
- Add the fields to a request type in a Service Desk project
- Call the Get request type fields REST API against the above request type
Expected Results
The default value is returned for all the fields.
Actual Results
The default value is only returned for some kind of fields. For example:
- The default value is returned for the Check-Box field:
- No default value is returned for the Numeric field:
Workaround
You can get the default value for all the custom fields by using the Get custom field contexts default values Jira Platform REST API endpoint instead.
Another workaround, for labels fields, has been provided by a Developers Community member in THIS THREAD:
All the custom type fields “com.atlassian.jira.plugin.system.customfieldtypes:labels” was a mystery because the options didn’t appear on labels or any other field option API.
Using this endpoint: /rest/api/3/jql/autocompletedata/suggestions?fieldName={FieldName} (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-autocompletedata-suggestions-get) we got all data suggestions just the way it appears on screen.