I have a issue created. The issue has a custom property "Ignore for Release" the value is checkbox.
Now I want to check and uncheck the value for this property using REST API.
What I tried:
1- Method GET. I have retrieved all the fields using https://domain.com/rest/api/2/field/
2- Method PUT. https://domain.com/rest/api/2/issue/{issueId}/properties/{fieldId}
Body:
[{ "id" : 12840}]
API returns 201 but still I don't see any changes for my issue. The check box should be checked when I hit API mentioned in bullet 2.
Not sure what I am doing wrong :(
I don't update checkboxes, but to update the Description field, I use a PUT method with the following call
/rest/api/2/issue/ABC-123
and pass in JSON like this
{
"update":
{
"description": [
{
"set": "new text goes here"
} ]
}
}
Thanks, Description part will work but I have concern with added custom field. Do you have any idea how to update value for checkbox?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can do customfields as well. I've managed to set a checkbox on my system passing in this JSON
{
"update":
{
"customfield_14572":
[
{
"set":
[
{
"value": "Yes"
}
]
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Warren It's working. You made my day!. Thank you. Also I have question how to reset the value back (how to uncheck?).
Please send me the link from did you find above payload. I am able to find the field Id. but I was using this API https://domain.com/rest/api/2/issue/{issueId}/properties/{fieldId}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm glad it worked for you as well.
To unset it, replace "Yes" with null - note that null doesn't use quote marks.
To find the field ID, go to Settings, Issues, Custom Fields, then on the custom field you want, click the 3 dots on the right of that row, select Edit and look at the URL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks!. You are Awesome. I never thought of null
Also thanks for helping about how to find field ID.
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.