Hello,
I'm trying to update 2 custom single-choice user fields on an issue via the Rest API but it's failing. I'm getting a 204 response indicating success, but the field isn't actually updating. I am trying all different combinations of samples I'm finding in these forums -- using the "update" section, using the "fields" section, using "set" vs "name" vs "id" vs "accountId". I'm using a valid email and accountId based on the user I'm getting back from the users API. The Jira documentation is just not helping very much here and the success response without any action is really irritating.
Can anyone help me out?
{"fields":
{"customfield_10092":
[{"name":"andrew.-------@vivun.com"}],
"customfield_10093":
[{"accountId":"60d5a76------6a939f0c"}]
}
}
{"fields":
{"customfield_10092":
[{"id":"andrew.-------@vivun.com"}],
"customfield_10093":
[{"set":"60d5a76------6a939f0c"}]
}
}
Hello Andrew,
Try the following format and let me know what effect it has :
{
"fields": {
"customfield_10092" : { "accountId" : "60d5a76------6a939f0c"},
"customfield_10093" : { "accountId" : "60d5a76------6a939f0c"}
}
}
Yeah, this option should work. My APIs are all working with that, and I'm using v3.
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.
Hi @Andrew Boeger , Welcome to the community!
You can check the format of json first by calling the issue get rest API.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used the format from this post exactly and get the same 204 response with no update taking place. https://community.atlassian.com/t5/Confluence-questions/Update-customfield-in-JIRA-using-REST-API/qaq-p/1606078
I tried getting the issue's details via API and these 2 custom fields are shown, and they have values populated if I use the web interface.
But once I submit my update API call above, the one getting the 204 response, it actually erases the value of these fields and sets them to null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.