I am attempting to set the values for a Jira object (type: array, items: option, customfieldtypes:multicheckboxes) using the Jira REST API, as specified in the documentation but it does not work giving me a variety of errors from "Bad Request" to "Not Authorized" but the problem seem to be that the body of the web request is malformed.
According to the documentation the format should be: "customfield_11201": [{"value": "Disclosure"}]
where "Disclosure" is an allowable value. This is throwing an error.
Hi @Ken O_Brien
I believe you need to add the field context as a key in a dict to be able to use it. example of payload
{
"fields":
{ "customfield_11201": [{"value": "Disclosure"}]
}
}
Hi Prince Nyeche. Thanks for the quick response that code will work for a single value, but when I try saving a comma separated list (multiple values) it throws an error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ken O_Brien
What example of comma separated list are you using? i would assume you will use it as below for multiple values
{
"fields":
{ "customfield_11201": [{"value": "Disclosure"},{"value": "SecondValue"},{"value": "ThirdValue"}]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep,
It is working now. It was working with only one but now multiple values are saving. I must have just had a slight problem with the formatting.
One thing I did notice. When using this data type it's seems to work best when you send it by itself in a the web request not as part of a comma separated list with a bunch of other custom fields.
Thanks for all your help!
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 the same problem, but the solution given by @Prince Nyeche only the first checkbox is updating.
Any thoughts ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We have to to save values to a Single select field using the rest API , could you please let me know how to use this code?
we have tried in lot of ways but no luck.
This custom filed id syntax should be used with update method or any othe method, please confirm.
issue.update({"fields":{"customfield_10903": [{"value": "Disclosure"}]}}) --- ? // this is the code we tried but didn't work.
Please assist me on this issue asap.
advance thank you,
Dev G
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.