Hi.
i'm trying to update a few checkboxes without sucess.
I'm stuck here:
Hello @Fernando Simões
I've just re-read your question and got a bit confused.
Since you haven't advised which REST API endpoint you're using or the actual request you are sending, only some JSON, it's not clear if you are trying to change the value of the checkbox options ('Yes" and "No") or the state of the options (ticked or not ticked)?
A checkbox field with two options with the same value of 'Yes', both of which could be enabled (ticked), wouldn't make any sense :-)
If you want to set the state of both the options to be ticked, you have to reference both their values, like this:
{
"fields":{
"customfield_13304": [
{
"value": "Yes"
},
{
"value": "No"
}
]
}
}
This is effectively saying "If there are two possible matching options, Yes and No, set them both"
The logic of unticking an option is completely bizzare!! There is no way to direct a single option to be unticked, as far as I can work out, except to set all the other possible option choices to one value. IE, to untick the No option in your example, would require:
{
"fields":{
"customfield_13304": [
{
"value": "Yes"
},
{
"value": "Yes"
}
]
}
}
... hence the problem you encountered, as you were effectively saying "If there is a Yes option, set it for both possible choices".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.