Jira REST API - Rejects empty Reporter field when creating issue

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2019

When using the REST API to create an Issue (Story type) via a Post request , if I supply an empty value for the Assignee field, like this:

"assignee": {"name": ""}

the Story is created with no Assignee and the Reporter set as me (the person who is currently running the connection session).

However, if I supply an empty value for the Reporter field too, like this:

"assignee": {"name": ""}
"reporter": {"name": ""}

the API rejects the request with a general 400 Bad Request error.

I need to provide a value for the Reporter field, like this:

"assignee": {"name": ""}
"reporter": {"name": "person@mycompany.com"}

for the story to be created, the Reporter set as someone, and no Assignee.

Is there a reason why the Assignee field value can be supplied as empty but not the Reporter field. Why can't the API ignore the empty Reporter field and apply me as the Reporter, as the default

 

1 answer

0 votes
Thomas Deiler
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 29, 2019

Dear @David Bakkers 

there is a simple answer to your question: That's how Atlassian has implemented it. If you would like to change this, I recommend to raise a suggestion at https://jira.atlassian.com.

So long

Thomas

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2019

That's how Atlassian has implemented it. I'm glad you're here to tell us these things.

Suggest an answer

Log in or Sign up to answer