Hello,
I am trying to update my custom field checklist using REST API and check off the desired values according to a specific selected value id. I've looked at documentation and don't get any errors in with my Python JSON format, but it does not check off anything in my checklist or update my issue at all.
checklist field ID: 10117
selectedValueID: 10224
Here's my Python code:
Hi Alex,
The format of the data looks like our "Checklist for Jira" Server/DC REST format, albeit from an older version (v4), because "option" is no longer a valid property.
Your post indicates you are on Cloud, so I am not sure which App and which Jira install you are using.
Here's some information that could help:
- Up to date documentation for Checklist for Jira (Server/DC).
- If you are using Checklist for Jira on Cloud, unfortunately there is no REST API to update the value at the moment.
- If you are using Issue Checklist on Cloud, here's the documentation for it.
Let me know if this helps!
Have a nice day
Thanks! Actually, "option" was not the problem. My issue was not updating for a few reason:
1. When having "update" it did not work, so remove it.
2. "Set" also seemed to be an issue, so removing it worked.
3. "Mandatory" was checked "false", which tells Jira it is not necessary to update.
Once I removed these in my JSON, everything updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to see it worked out :)
After taking a closer look, I see why you had to remove "update" and "set", because it's synonym to "fields".
When using Jira REST API, you either use "update" or "fields", not both at the same time.
"fields" is a shortcut for doing an "update" with "set" operation. Example:
"fields": {
"my-field": "value"
}
is the same as doing:
"update": {
"my-field": [
{
"set": "value"
}
]
}
The "update" method becomes interesting if you want to do something else than "set", which overwrites the field value completely. If you wanted to add a value to the existing value, you would do:
"update": {
"my-field": [
{
"add": "value"
}
]
}
Have a nice day!
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.