Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-75814

REST API /rest/api/3/issue/createmeta endpoint should indicate a more explicit expected format type for description and alike fields

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Problem Definition

      When calling the api/3/issue/createmeta REST API endpoint, this indicates that fields like Description expect a string when they do not.

      Steps to reproduce:
      Make a REST API call to that endpoint such as:

      curl -D- -X GET -H "Authorization: Basic [redacted]" -H "Content-Type: application/json" "https://[cloudsitename].atlassian.net/rest/api/3/issue/createmeta?projectKeys=SCRUM&issuetypeNames=Bug&expand=projects.issuetypes.fields"
      

      This returns all the fields on that issuetype in that project. Specifically when reviewing the Description field, it indicates:

      "description":{
      "required":false,
      "schema":{
        "type":"string",
        "system":"description"
        },
      "name":"Description",
      "key":"description",
      "hasDefaultValue":false,
      "operations":["set"]
      } 
      

      However this type of string is misleading. Because if a user attempts to provide a basic sting when creating the issue here, they are instead seeing a response of:

      {
      "errorMessages": [
      "Number value expected as the Sprint id."
      ],
      "errors": {
      }
      } 
      

      Suggested Solution

      Instead of returning a type of string, the /createmeta endpoint should indicate that this field expects the format to be in the Atlassian Document Format (or ADF) instead.

      Why this is important

      For developers creating Jira integrations for the first time, this problem is confusing and misleading to them. The old versions of the editor in Jira would actually have expected just a string here. However since all of Jira Cloud is today using a newer editor that stores that data in a more comprehensive data format (ADF), the REST API should be more clear that this is expected here.

      Workaround

      Using the /v2/ endpoint when creating a new issue will still accept a plain string here.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aheinzer Andy Heinzer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: