Create issue - Getting error on Reporter "Field 'reporter' cannot be set

Ravi Somisetty February 23, 2014

Hello,

I am trying to use JIRA Rest API to create an issue in JIRA. I am seeing this error

{

"errorMessages": [],

"errors": {

"reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."

}

}

I checked with the client and he says the user that I am using has the permission to create the issue. Client is using 4.X version? Please shed some light and any leads are highly appreciated.

Thanks in advance.

6 answers

1 accepted

9 votes
Answer accepted
Ravi Somisetty March 13, 2014

Thanks a lot Nic for your support. I was able to resolve the issue. It was the permissions issues for the user that I was using and Just for more details: I was trying to access this from SF, to connect it make sure to use base64 encoded authentication and add this to http request header as AuthenticationHeader.

Justin Rice February 21, 2020

This does not work.

Like Bik Nandy likes this
4 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2014

Does the user you are logging in as have the right to "modify reporter"?

Is the reporter on the "create issue" screen at all?

Ravi Somisetty February 23, 2014

Yes, I see the "reporter" field on the screen. And the username i am using here has the full permissions to create/modify.

Do I need to worry about the user I am using in the header? Do I need to check whether this user that I am using in the header also has the permission to create the issue?

I am invoking using the Rest API/Create issue.. here is the request:

{ "fields": { "project":{ "key": "Key"}, "summary": "REST EXAMPLE", "description": "Creating an issue via REST API", "issuetype": { "name": "Story"}, "customfield_11212": {

"self": "http://jiradev/rest/api/2/customFieldOption/12554",

"value": "Astra CSI",

"id": "12554"

}, "customfield_10324": [{

"self": "http://jiradev/rest/api/2/customFieldOption/12196",

"value": "Astra",

"id": "12196"

}], "reporter": {

"self": "http://jiradev/rest/api/2/user?username=name",

"name": "name",

"emailAddress": "email@email.com",

"displayName": "Name",

"active": true

} } }

Can you please check and let me know what I am missing.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2014

Absolutely yes, the person you are running the REST request in is the one that needs the permissions, so the headers should match.

Your REST call looks good to me though.

Like Dmitriy Kalabin likes this
Ravi Somisetty February 23, 2014

So, You mean the User that I am using in the REST client header should be able to modify the reporter field on the JIRA side. That kind of persmission the user should have. Is that correct statement?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2014

Yes, exactly.

The REST API respects the way Jira works on the front-end, so if the user can't do something in the UI, REST won't let them either.

Ravi Somisetty February 25, 2014

Hi Nic, not sure what I am missing here. We are able to create the issue successfully on the UI and were also able to modify the reporter. But using the REST API, still getting the same issue when we are creating --> {

"errorMessages": [],

"errors": {

"reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."

}

}

I would really appreciate if you could suggest me what we are missing here?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 25, 2014

Nor am I. It really does sound like REST is not understanding who you are logging in as.

Could you try it without the reporter in the request and see what it does? Have a look at the issue it creates and see what it manages to set.

Louise Whittaker August 19, 2016

Thank you Nic! My problem was down to certain users not having the 'modify report' permission. Been battling with it for the last few hours. 

Louise Whittaker August 19, 2016

*modify reporter

2 votes
s2zaman July 8, 2015

When getting errors like;

"reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."

"assignee": "Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown."

"summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown."


Solution: (you should create screen permission before creating issue with the code, only if you are creating it with the code)

Solution 1: 1st solution is the same as @Ravi Somisetty provided on this same page.

Solution 2: Here i will elaborate @Nic Brough [Adaptavist]'s answer.

Verify if the "reporter" or "assignee" or "summary", exists on the 'Create Issue'.

You may find the 'Create Issue' as;

  • Go to your JIRA project main page.
  • Click the "Project administration" , on the bottom of left sidebar.jiraProjectAdministrationCogSnap.PNG
  • Select the "Screens"  from left sidebar.jiraProjectScreenSnap.PNG
  • Now click the "Default Screen" . jiraProjectScreenSnap2.PNG.
  • Here is your "Create Issue" screen.jiraProjectScreenSnap3.PNG
  • Add any field that is missing.
  • ......and your code should succeed.
Fareed F March 28, 2016

I am not creating with code and I see 'assign' 'summary' & 'reporter' all in Create Issue. 

I can only create JIRA tickets from Zendesk for one project. I have 4 more projects which I would like to have this ability. I currently receive the error "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."

My current work around is to create the JIRA ticket in the project that works, then move the ticket to another project.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2016

That strongly suggests that you are using a user who does not have access to the failing four projects, or if they do, they do not have the "edit reporter" permission.

Like zny likes this
1 vote
Kostadin_Kocev April 20, 2020

[DISCLAIMER: NOT A SOLUTION]

Has anyone already found an answer to the problem?

So to be clear:

  • I have 'Modify Reporter' permission and I can validate that through the 'Permission Helper' on the admin page
  • I also have defined reporter field on my board issue screens 

Here is my request object:

Screenshot from 2020-04-20 19-47-53.png 

Also, I have enabled an option for auto-generating acc for the unknown users, so they can raise a ticket on their own through my app and their Jira acc will be set on the fly(in other words only one account can raise a ticket on behalf of others).

It is weird that everything works properly unless I put reporter property so I get this error:

Screenshot from 2020-04-20 19-53-00.png

So simply put, so far I have required permissions access and I have properly configured screen schema with the system field "Reporter" and I am using Jira Server REST API 7.6.1v.

Also, I can achieve that functionality by Jira Cloud REST API - create customer requests with "raiseOnbehalfOf" property so it works properly - but I want to achieve consistency so I use only one API, so the code is more clear and understandable.

.

Andy Webster May 25, 2021

I got it to work by using 

"reporter": {"accountId": "<insert account id of user"}

Also, I had to give the right permissions to "Modify Reporter".  Please note that for my instance at least, `Administrator (migrated)` is different than `Administrator`.  We had moved from an on premise solution to the cloud solution.   

1 vote
Ravi Somisetty February 23, 2014

Yes, I see the "reporter" field on the screen. And the username i am using here has the full permissions to create/modify.

Do I need to worry about the user I am using in the header? Do I need to check whether this user that I am using in the header also has the permission to create the issue?

I am invoking using the Rest API/Create issue.. here is the request:

{ "fields": { "project":{ "key": "Key"}, "summary": "REST EXAMPLE", "description": "Creating an issue via REST API", "issuetype": { "name": "Story"}, "customfield_11212": {

"self": "http://jiradev/rest/api/2/customFieldOption/12554",

"value": "Astra CSI",

"id": "12554"

}, "customfield_10324": [{

"self": "http://jiradev/rest/api/2/customFieldOption/12196",

"value": "Astra",

"id": "12196"

}], "reporter": {

"self": "http://jiradev/rest/api/2/user?username=name",

"name": "name",

"emailAddress": "email@email.com",

"displayName": "Name",

"active": true

} } }

Can you please check and let me know what I am missing.

Justin Rice February 21, 2020

I have the exact issue.

0 votes
Ant December 11, 2020

I know this old now, but I hit the same problem, the underlying cause is if the fields are not present on the main UI screen within JIRA itself (i.e. when you go to manually created an issue) they cannot be set via the api.

What I have done, is to create the issue first and then use the edit issue function in the api to set the other fields.  This works as the fields I need to set are available in the UI edit screen.

 

Hope that makes sense and helps someone else.

Suggest an answer

Log in or Sign up to answer