Search code examples
phpgoogle-oauthgoogle-tasks-apigoogle-tasks

Google Tasks - updating status from Completed to needsAction


Google says that setStatus property for the Tasks can be 'completed' and 'needsAction': https://developers.google.com/apps-script/class_tasks_v1_schema_task#setStatus

I'm using the API with the PHP library. When I insert a new task, I can set the status to 'completed' or 'needsAction'. But when I edit a task, if the task is already set as 'completed', I can't set the status to 'needsAction'.

So, the update works from 'needsAction' to 'completed', but not the other way. Directly on the web you can change the status however you like.

Anyone else with the same issue?


Solution

  • You also need to set the completedDate to null.