Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I'm attempting to use the example here: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Edit+issues#JIRARESTAPIExample-Editissues-Exampleofassigninganissuetouser"harry"
I use this curl command:
curl -k -D- -u jsacco:xxxxxx -X PUT --data @UpdateFieldsJSON.txt -H "Content-Type: application/json" https://xxxxxx.atlassian.net/rest/api/latest/issue/GE-39
with this json data:
{
"fields":{
"assignee":{"name":"jsacco"}
}
}
and get this result:
HTTP/1.1 400 Bad Request
{"errorMessages":[],"errors":{"assignee":"Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown."}}
According to the example, this should work, but it doesn't. Why doesn't this work?
As a side note, updating the assignee field directly works just fine as follows:
curl -k -D- -u jsacco:xxxxxx -X PUT --data @UpdateAssigneeJSON.txt -H "Content-Type: application/json" https://xxxxxx.atlassian.net/rest/api/latest/issue/GE-39/assignee
I don't understand why this should work if the former doesn't. I'd like to get the former working so I can update more than one field at a time.
I got this working by adding the Assignee field to the list of fields available when editing an issue. The clue was knowing someone else was able to make this work (thanks Lucas) and seeing the error message said " It is not on the appropriate screen". I guessed that "the appropriate screen" might be the edit panel. It would be nice if the error message actually stated what panel it was talking about.
I believe that I can resolve issues like this by using a GET request to https://xxxxxx.atlassian.net/rest/api/latest/issue/GE-39/editmeta (I had been looking at the createmeta result by mistake) to get the list of fields that are available for modification via a PUT request. I'm assuming the assignee field would not have been listed until I added it as noted above, as it is now listed. I haven't tried to remove it from the edit field list to see if it goes away in the metadata result, but I'm assuming it would.
I want to update Automation Status field for a Issue type as Test Case using Rest Api.
I am using below url
screens/15300/availableFields
On UI for all 3 screens, Create/Edit/View automation status field is visible but when I do GET of above url, automation status field is not retrieved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting below error when i try to update the status of issue using Rest Api
"resolution":"Field 'resolution' 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."}}"
i am doing PUT on /rest/api/2/issue/issue_id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Either check the transition screen has those two field, or stop trying to set them in the call to make the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ArunKumar Santh and @Kavitha Yeleti could you please check whether the fields that you are trying to set are in the edit/create screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] yes assignee field is available in both create and edit screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
I'd just tested this same call against the same URL (https://xxxxxx.atlassian.net/rest/api/latest/issue/GE-39) but for another issue, using an OnDemand instance. I was able to assign the issue to another user. However, I'd used Postman (a Chrome extension) instead of Curl.
So, I have two concerns about it:
- Could you test with Postman?
- Are you able to assign the issue with this same user (jsacco)?
My request was:
{ "fields":{ "assignee":{"name":"xxx"} } }
Best regards,
Lucas Timm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for running the test. I installed Postman and tried it. I get the same result:
{
"errorMessages": [],
"errors": {
"assignee": "Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown."
}
}
Sounds like there's something different about my OnDemand instance. But I don't know how to determine what it is in order to fix it. I've run createmeta on the issue and the assignee field is available so I would think it could be set in this manner. Still looking for ideas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have a Similar issue, For me its working when i hit the JIRA from PostMan, However when i am posting the same JSON it from the Java code, I am getting the error ,
{ "errorMessages": [], "errors": { "description":"Field 'description' 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." }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
am also getting the same error while setting an assignee from client side through rest api,while it worked fine from PostMan. and i checked in my jira that i have permissions to assign issues and can be an assignee too, and my assignee field is available in create screen as well.
If any one knows the answer please let me know. Thanks!
{"errorMessages":[],"errors":{"asignee":"Field 'asignee' cannot be set. It is not on the appropriate screen, or unknown."}}
Regards,
Kavitha
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.