I have followed the documentation at https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-post
But constantly get this error message:
{
"errorMessages": [
"The id has to be provided.",
"The id has to be provided."
],
"errors": {}
}
The documentation does not say to add an id, and how can I provide an id for an option I am trying to create, and therefore does not have an id yet?
Hi @Chance Douglass -- Welcome to the Atlassian Community!
I have not tried that one, but I wonder what your request's body options look like.
The example in the documentation seems to be an update to add more options. And the existing options are also passed, including their current id values.
Kind regards,
Bill
Bill, thank you, nice to e-meet you.
Below is the payload portion of the script with current values. When I include the current value I get the same message. If I change to 'optionId' instead of "id" on the current value I get incorrect payload.
payload = json.dumps({
"options": [
{
"disabled": false,
"id": "14617",
"value": "Option 1"
},
{
"disabled": false,
"value": "Option 2"
},
{
"disabled": false,
"value": "Option 3"
}
]
})
This is a field created for testing and so 'Option 1', etc are the actual values and not stand-ins
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the documentation and this post in the developer community: https://community.developer.atlassian.com/t/how-to-add-an-option-to-a-select-list-using-rest-api-in-python/70734
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
Thank you. Removing the existing options, and only including the new options with a POST worked. Thank you again
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.