How can I unassign a task?

Hello. I use java asana client. I cannot figure out if it is possible to unassign a task that had been assigned to someone before. Right now my syntax is something like this:
asanaClient.tasks.updateTask(taskGid).data("assignee", null).execute();
Unfortunately this does not work. Providing an empty string instead of null also does not work. If I pass the email of a different user, for example, it will work just fine, but I cannot make the task unassigned completely.
Thank you in advance

Hi @Grigory_Krasovsky,

I don’t use the java client so perhaps there’s an issue with it, but I can say for sure that setting assignee to null is the proper way to unassign a task.

When you say that “does not work”, can you be more specific? Does it return an error and which one, or it seems to execute but the task is still assigned, or ??

Hello. Thank you for your reply. When I set null it does not unassign the task. No error returned

Seems like it might be an issue with the java client. Can you try it in Postman (or equivalent) to confirm that it’s working for you there? Then we can report it as a probably client issue.

1 Like

I just tried it, to confirm that, without framework, the proper way to unassign, is to send:
PUT /tasks/idTask
with JSON data: {“data”:{“assignee”:null}}

So, as @Phil_Seeman said, it looks like a java client issue.

1 Like

Thank you very much!