Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-10532

The Get request type fields REST API endpoint does not return the default value for all the field types

    XMLWordPrintable

Details

    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

      1. 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.
      2. Add the fields to a request type in a Service Desk project
      3. 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.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dbonotto Dario B
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: