Hi,
i've created an application to duplicate projects. Unfortunately I am not able to create Issues since i've swapped from our test environment to our productive one. It worked fine while using the test system. Our IT ensured me there's no difference in Jira version between these two systems.
I am creating my JSON as following:
tIssue := '{
"fields": {
"project":
{
"id": "|projectID|"
},
"summary": "|issue_.fields.summary|",
"description": "|issue_.fields.description|",
"issuetype": {
"name": "|issue_.fields.issuetype.name|"
},
"priority": {
"name": "|issue_.fields.priority.name|"
},
"labels": [|tLabels|]
}
}';
The error i am generating from the REST-API is shown below:
{"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.","description":"Field 'description' cannot be set. It is not on the appropriate screen, or unknown.","priority":"Field 'priority' cannot be set. It is not on the appropriate screen, or unknown.","labels":"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown."}}
How to fix this?
I would be very thankful for a reply!
Hi Luca,
did you check for permissions? I came across a few cases where the user (=the user which you are accessing the API with) is missing a membership in the appropriate role or group.
From what I observed in all cases (even it is not a specific permission problem here) that the non-production environment and the production environment differs in one or more little aspects - a thorough comparison of borh systems should help sorting the current issues out.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a first diagnosis I would go with "Permission Helper" from "Admin Helpers" - just to rule out the account in question is lacking permissions:
https://confluence.atlassian.com/adminjiraserver/jira-admin-helper-938847791.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was trying to use a service account via the API and this was exactly my issue.
I needed to add the service account to the projects IN JIRA and then it had no issues making the changes via the API
thank you @Daniel Ebers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The issue in my case was I was not passing JSESSIONID properly in header. And yes API error response message is confusing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira Data Center has same issue. I try to create an issue using curl:
Command
curl -H "Authorization: Bearer <insert token>" -d @[deleted]_payloadsmall.json -X POST -H "Content-Type: application/json" -H "Accept: application/json" "https://<server>/rest/api/2/issue"
Payload is:
{
"fields": {
"project": { "key": "PTEST" },
"summary": "IGNORE - Created for testing",
"issuetype": { "name": "Bug" }
}
}
Response
{"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown."}}
This message is bogus because the summary field exists on the create screen.
So in my case,
Every company has their own authentication and authorization. We use One Login. And for that, I found out that our user/service accounts must have a particular header 'X-Auth-Params-Email' to be configured.
In our case, when that is missing, Jira receives the api call but is missing that header in the request so it thinks it is coming from an unauthorized user. Thus, it is returning the error message.
...I am still waiting for our team to set that header to confirm this works, but if all else fails, look at the user account.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did this solve the issue, if so can you provide an example of what that header looks like? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From last experience it is very true that an authentication problem can cause the message even if the field is present on the screen.
Also, like added to the last comment here, missing permissions (even when authentication is fine) can lead to the error message which can be a bit confusing, yes.
There is a bug open with Atlassian which describes it even better:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the Summary field on your Create screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.