I am using this with a curl command but every time i get same response for priority , components and labels.
curl -u username:password -X PUT --data @Data.json -H "Content-Type: application/json" https://<SERVER>/rest/api/2/issue/<issueKey>
below is my data.json File
{"update":{"labels":[{"add":"MYLABEL"}]}}
Response:
{"errorMessages":[],"errors":{"labels":"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown."}}
I'm afraid we can't tell you much more than the error message does. You are trying to edit an issue, setting a field that is not editable because it is noton the edit screen.
There are actually two possible problems here
1) the field is no enabled for edit, because it is not set to be an editable field
2) the account you are using does not have the rights to edit the issue.
Thanks @Nic Brough -Adaptavist- for your response.
The field is editable from the UI. (Or is there any alternate way for how to check the field is editable or not.)
My acount has Edit permissions, thats why i am able to edit the issue from UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To check if the field is editable, go to an issue and click "edit" and check if the field is shown and that you can update it there.
If the field is editable, then the other thing that causes this problem is that the user you have logged in as does not have edit. This error message can happen when you have failed to authenticate as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- as I mentioned before, from the UI these fields are available. but not from the update API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then it's your authentication
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But with the same authentication method, I use create a log, update transition, attachment, and assign API all are working fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You aren't crazy @Azaz-Ur-Rehman 3173-FBAS_BSCS_F15 , this is an issue on Atlassian's side but sadly the solution is marked as "Won't do"
https://jira.atlassian.com/browse/JRASERVER-27936
https://jira.atlassian.com/browse/JRASERVER-27929
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.