Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-15147

Remove JSM "Groups" custom field from REST API endpoint

    XMLWordPrintable

Details

    Description

      Issue Summary

      Jira Service Management 5.9 introduced the ability to share requests with groups. This feature introduces the "Groups" (com.atlassian.servicedesk:sd-request-groups) custom field to store this data.

      The "Get request type fields" endpoint provides the fields listed on a request type. Most REST API consumers expect this technical/locked custom field to be excluded from the result.

      Steps to Reproduce

      1. Install JSM DC 5.9.0+.
      2. Create a new service desk project.
      3. Send an authenticated HTTP GET request to <jira-base-url>/rest/servicedeskapi/servicedesk/1/requesttype/1/field.

      Expected Results

      Only the request type fields are provided in the response. For example:

      {
          "requestTypeFields": [
              {
                  "fieldId": "summary",
                  "name": "What do you need?",
                  "description": "Tell us what you're looking for. For example, 'put me on the mailing list'.",
                  "required": true,
                  "validValues": [],
                  "jiraSchema": {
                      "type": "string",
                      "system": "summary"
                  }
              },
              {
                  "fieldId": "description",
                  "name": "Why do you need this?",
                  "description": "",
                  "required": true,
                  "validValues": [],
                  "jiraSchema": {
                      "type": "string",
                      "system": "description"
                  }
              }
          ],
          "canRaiseOnBehalfOf": true,
          "canAddRequestParticipants": true
      }
      

      Actual Results

      The "Groups" (com.atlassian.servicedesk:sd-request-groups) custom field is included in the response.

      {
          "requestTypeFields": [
              {
                  "fieldId": "summary",
                  "name": "What do you need?",
                  "description": "Tell us what you're looking for. For example, 'put me on the mailing list'.",
                  "required": true,
                  "validValues": [],
                  "jiraSchema": {
                      "type": "string",
                      "system": "summary"
                  }
              },
              {
                  "fieldId": "description",
                  "name": "Why do you need this?",
                  "description": "",
                  "required": true,
                  "validValues": [],
                  "jiraSchema": {
                      "type": "string",
                      "system": "description"
                  }
              },
              {
                  "fieldId": "customfield_10113",
                  "name": "",
                  "description": "",
                  "required": false,
                  "validValues": [],
                  "jiraSchema": {
                      "type": "array",
                      "items": "group",
                      "custom": "com.atlassian.servicedesk:sd-request-groups",
                      "customId": 10113
                  }
              }
          ],
          "canRaiseOnBehalfOf": true,
          "canAddRequestParticipants": true
      }
      

      Workaround

      Sharing service requests with groups can be disabled by setting the following site-wide feature flag (How to manage dark features in Jira):

      sd.share.request.with.group.disabled
      

      The change will take immediate effect. Existing group request shares will be revoked but can be restored by removing the feature flag.

      Attachments

        Issue Links

          Activity

            People

              c8bcca445054 Benjamin Suess
              1353e2e9fd2f Benjamin S
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync