I am trying to use JIRA's Rest API to update bugs custom field
Here are the steps I followed:
1. Get the key of the custom field using the GET request -
https://nsssatheesh.atlassian.net/rest/api/2/issue/HI-2/editmeta
I get the response similar to -
... "customfield_10030": { "required": false, "schema": { "type": "array", "items": "user", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:people", "customId": 10030, "configuration": { "isMulti": true } }, "name": "Code-Reviewer-Approver", "key": "customfield_10030", "autoCompleteUrl": "https://nsssatheesh.atlassian.net/rest/api/1.0/users/picker?fieldName=customfield_10030&showAvatar=true&query=", "operations": [ "add", "set", "remove" ] }...
2. Create a PUT request using the following content
{ "update":
{ "customfield_10030":
[
{
"set":
[
{ "name": "Satheesh Nss" }
]
}
]
}
}
I am getting the response code - 204. But the customfield is not getting updated.
Could you please guide to fix this issue?
Thanks and regards,
Satheesh N
I used accountid instead of name to update the value successfully.
Ref:
Solved: Edit Assignee Using Jira REST API and User's Email (atlassian.com)
Solved: where can i find my Account ID (atlassian.com)
Request which has done the update:
{ "update":
{ "customfield_10030":
[
{ "set":
[
{ "accountId": "557058:aeb07d9d-9850-4314-a997-52f213919ce7" }
]
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.