Cannot set enum custom field back to empty using REST API
I have a custom field set up in my projects (named “Requires QA review” with two values, “Yes”, “No” and set as “can be empty”. In the UI, I can set a value BUT I can also set the value back to empty (when it displays “no requires qa review”).
I would like to be able to do the same thing using the REST API but I cannot find any way to do it. When I view the enum bundle value when the value is cleared, it is reported as null. I've tried sending the null value but get a message saying null is not a valid value. I've tried sending the “no requires qa review” value but get the same response.
Is there a way to set the custom field value back to empty through the REST API?
Please sign in to leave a comment.
Hi Nick Hallwood,
Sending a null value is the correct approach to clearing field values. For example, if you usually post this to
api/issues/{issueKey}
to change the "Requires QA review" field value to “Yes”:…then sending this should set an empty value:
Can you please share the endpoint you use, the exact body you send, and the error you get?
Hi Julia,
Thanks for your quick response! Your explanation of how to send the null value has solved the issue for me. I had been using the following in the body
instead of just “Value”: null
Thanks. Nick.
Thanks for the update! I'm glad I could help 😊