Going Stellar

Home/Jira fields reference

Jira Cloud fields and work types

Jira reporter field: reading it and why PUT fails

reporter is the person recorded as having raised the work item. It reads back as a user object with accountId, displayName, emailAddress, avatarUrls, timeZone and accountType. In the run, a PUT that set reporter by accountId was refused with a message about the screen, although the endpoint description says screens are not checked.

Endpoints

MethodPathWhat it does
PUT/rest/api/3/issue/{issueIdOrKey}Setting fields.reporter on an existing work item answered 400.
POST/rest/api/3/issueSetting fields.reporter on create answered 400 too.
GET/rest/api/3/issue/{issueIdOrKey}Returns reporter and creator as user objects.

Examples

PUT /rest/api/3/issue/{issueIdOrKey}

Tries to set the reporter of an existing work item by accountId.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "reporter": {
      "accountId": "<accountId>"
    }
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=reporter'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}?returnIssue=true&fields=reporter',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'returnIssue': 'true', 'fields': 'reporter'},
    json={'fields': {'reporter': {'accountId': '<accountId>'}}},
)
print(r.status_code, r.text)

Response: HTTP 400

{
 "errorMessages": [],
 "errors": {
  "reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."
 }
}

Sent to Atlassian Cloud on .

GET /rest/api/3/issue/{issueIdOrKey}

Reads the reporter with other system fields. The response is a full user object.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=priority,duedate,labels,components,fixVersions,environment,timetracking,reporter,status,resolution,issuetype,project,created,updated' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'fields': 'priority,duedate,labels,components,fixVersions,environment,timetracking,reporter,status,resolution,issuetype,project,created,updated'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "key": "ZZREF-6",
 "fields": {
  "reporter": {
   "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=<accountId>",
   "accountId": "<accountId>",
   "emailAddress": "<email>",
   "avatarUrls": {
    "48x48": "<avatar url>",
    "24x24": "<avatar url>",
    "16x16": "<avatar url>",
    "32x32": "<avatar url>"
   },
   "displayName": "<display name>",
   "active": true,
   "timeZone": "Europe/Bucharest",
   "accountType": "atlassian"
  }
 }
}

Sent to Atlassian Cloud on .

GET /rest/api/3/issue/{issueIdOrKey}

Reads reporter and creator together. Both are user objects.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fields=*navigable' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'fields': '*navigable'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "fields": {
  "reporter": {
   "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=<accountId>",
   "accountId": "<accountId>",
   "emailAddress": "<email>",
   "avatarUrls": {
    "48x48": "<avatar url>",
    "24x24": "<avatar url>",
    "16x16": "<avatar url>",
    "32x32": "<avatar url>"
   },
   "displayName": "<display name>",
   "active": true,
   "timeZone": "Europe/Bucharest",
   "accountType": "atlassian"
  },
  "creator": {
   "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=<accountId>",
   "accountId": "<accountId>",
   "emailAddress": "<email>",
   "avatarUrls": {
    "48x48": "<avatar url>",
    "24x24": "<avatar url>",
    "16x16": "<avatar url>",
    "32x32": "<avatar url>"
   },
   "displayName": "<display name>",
   "active": true,
   "timeZone": "Europe/Bucharest",
   "accountType": "atlassian"
  }
 }
}

Sent to Atlassian Cloud on .

POST /rest/api/3/issue

Creates a work item with no reporter in the request. The create call succeeds.

curl

curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "ZZREF"
    },
    "issuetype": {
      "name": "Sub-task"
    },
    "parent": {
      "key": "{issueIdOrKey}"
    },
    "summary": "Sub-task example"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'ZZREF'},
                     'issuetype': {'name': 'Sub-task'},
                     'parent': {'key': '{issueIdOrKey}'},
                     'summary': 'Sub-task example'}},
)
print(r.status_code, r.text)

Response: HTTP 201

{
 "id": "10787",
 "key": "ZZREF-8",
 "self": "https://your-domain.atlassian.net/rest/api/3/issue/10787"
}

Sent to Atlassian Cloud on .

POST /rest/api/3/issue

Sets the reporter on create.

curl

curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "project": {
      "key": "ZZREF"
    },
    "issuetype": {
      "name": "Task"
    },
    "summary": "Reporter on create",
    "reporter": {
      "accountId": "<accountId>"
    }
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/issue',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'project': {'key': 'ZZREF'},
                     'issuetype': {'name': 'Task'},
                     'summary': 'Reporter on create',
                     'reporter': {'accountId': '<accountId>'}}},
)
print(r.status_code, r.text)

Response: HTTP 400

{
 "errorMessages": [],
 "errors": {
  "reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."
 }
}

Sent to Atlassian Cloud on .

PUT /rest/api/3/issue/{issueIdOrKey}

For comparison, a custom field that is not on the screen is set with PUT and accepted.

curl

curl -X PUT \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "fields": {
    "customfield_10222": "x"
  }
}' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.put(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'fields': {'customfield_10222': 'x'}},
)
print(r.status_code, r.text)

Response: HTTP 204

No response body.

Sent to Atlassian Cloud on .

How it behaves

  • PUT with fields.reporter {"accountId": ...} answered 400 with errors.reporter set to Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown (sys-reporter).
  • reporter is not listed in the edit metadata or in the create metadata for the work type in the test project (editmeta-zz, createmeta-zz-task).
  • A create with fields.reporter answered 400 with the same message, while a create without it answered 201 (sys-create-with-reporter, issue-create-subtask).
  • A custom field that was not on the screen was set by PUT and answered 204, so the screen check is not applied to ordinary fields (set-new-field-off-screen). The refusal for reporter is specific to this field.

Where the documentation differs

  • PUT /rest/api/3/issue/{issueIdOrKey}

    Sent to Atlassian Cloud, . The documentation: The OpenAPI description of PUT /rest/api/3/issue/{issueIdOrKey} says: "This endpoint doesn't check screen configurations to determine if a field is editable."

    What happened: Setting fields.reporter was refused with 400 and the message "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown." A field that is also missing from the edit metadata, components, was accepted by the same endpoint, and so was a custom field that was not on the screen.

Pitfalls

  • Do not assume PUT can change reporter because the endpoint skips the screen check. The field must be available to the project and the caller.
  • A user object includes personal data such as the email address. Store the accountId and look the rest up when needed.
  • The accountId is the only stable identifier, since display names and addresses can change.

Questions and answers

Why does the reporter edit say the field is not on the screen?

The error text points at screens or an unknown field. The run did not show which of the two applied, so check the project's field configuration and screens.

Is reporter the same as creator?

They are separate fields in the responses. Both came back as user objects, and only reporter was probed for writes.

Sources

  1. Issues (Jira REST API v3)
  2. Edit issue (Jira REST API v3)
  3. Get issue (Jira REST API v3)
  4. Get edit issue metadata (Jira REST API v3)

Markdown version · All Jira fields pages