Rest 2.0 Ticket Update for Custom Fields with null values does not delete them

Hi,

With the REST 2.0 it’s not possible to delete a CF value? I’ve tried multiple ways but it always ends up setting the value as null. Via Rest 1.0 it’s possible to delete values but it causes other issues.
Is there a way to do it or anybody knows a way to accomplish this?

Regards

What type of custom field? Using Postman I am able to delete a custom field value of type “Enter one value” using the following:

curl --location --request PUT 'http://localhost/REST/2.0/ticket/20/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ...' \
--data-raw '{
   "CustomFields": {"My CF": ""}
}'

It doesn’t really delete it, it sets it to null. And it gives me a warning in the console everytime a user loads the ticket.

For example if I send this data:

{
  "CustomFields": {
    "Priority": ""
  }
}

It replies with:

[
    "Priority High deleted"
]

If you look in the interface we have it like this (instead of displaying “Not set”):

image

And if I get the ticket it shows that the value is null

"CustomFields": {
      "4": [
         null
      ],
      ....

I’ve looked into the git repository and there was a Pull request that caught my attention:

I’ve modified that file to be able to fix this problem.
Thanks for your help!