How to tell if an issue custom field is of the type "Atlassian Document"

Hi,

I’m writing an integration using the rest API, that creates issues.

When obtaining custom fields, I make a request to /rest/api/2/issue/createmeta with parameters {"projectIds": "x", "issuetypeIds": "y", "expand": 'projects.issuetypes.fields'}

An example field returned is

{
  "environment": {
    "required": true,
    "schema": {
      "type": "string",
      "system": "environment"
    },
    "type": "string",
    "system": "environment",
    "name": "Environment",
    "key": "environment",
    "hasDefaultValue": false,
    "operations": ["set"]
  }
}

When I send an issue create request with this value set in the fields array, for example

...
"fields": {
  "environment": "OS: Arch, Resolution: 1366x768"
}
...

I receive the error

“environment”:“Operation value must be an Atlassian Document (see the Atlassian Document Format)”

I understand how I can fix the error (by sending a document format parameter), however what I don’t understand, is how I am to know this is what it’s expecting from the field data returned from the createmeta request.

Thanks in advance!
Tom

Hi, have you figured out how to identify when a field is in document format?

1 Like