REST API to GET Fields in Screen only working for fields with id prefix “customfield_”

XMLWordPrintable

    • 1
    • 2

      Running REST API GET /rest/api/3/field/{fieldid}/screens only working for field ids with prefix "customfield_"

      Steps to Reproduce

      1. Run API GET URL/rest/api/3/field/search
      2. Get the Field “ids”  
      3. Run API : GET URL/rest/api/3/field/{fieldId}/screens

      Expected Results

      • Return Screens containing the Field with the specified field ID

      Actual Results

      • Only returns for fields with field ID prefix “customfield_”

      Sample Output : GET URL/rest/api/3/field/search

       {
                  "id": "description",
                  "name": "Description",
                  "schema":

      {                 "type": "string",                 "system": "description"             }

      ,
                  "description": ""
              },

              {
                  "id": "customfield_10074",
                  "name": "Approvals",
                  "schema":

      {                 "type": "sd-approvals",                 "custom": "com.atlassian.servicedesk.approvals-plugin:sd-approvals",                 "customId": 10074             }

      ,
                  "description": "Provides search options for Jira Service Management approvals information. This custom field is created programmatically and required by Jira Service Management."
              },

       

      Sample Output : 

      GET URL/rest/api/3/field/description/screens

      {
          "errorMessages": [
              "The field with ID 'description' was not found."
          ],
          "errors": {}
      }

      GET URL/rest/api/3/field/customfield_10074/screens

      {
          "maxResults": 100,
          "startAt": 0,
          "total": 1,
          "isLast": true,
          "values": [
             

      {             "id": 10121,             "name": "SUMSCREEN”,             "description": ""         }

          ]
      }

      Workaround

            Assignee:
            Unassigned
            Reporter:
            Victor Mokaya (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: