[search API] due_on=null does not work

Asana API Explorer GET /workspaces/AAAAAA/tasks/search?opt_fields=gid,assignee,due_on,name,completed,assignee_status&created_by.any=BBBBB&completed=false&projects.any=CCCCC&due_on=null

res: { “data”: }

but with

GET /workspaces/AAAAAA/tasks/search?opt_fields=gid,assignee,due_on,name,completed,assignee_status&created_by.any=BBBBB&completed=false&projects.any=CCCCC

res: { “data”: [
(skipped)
{ “gid”: “SSSSS”, “assignee”: { “gid”: “DDDDD”, “resource_type”: “user” }, “assignee_status”: “inbox”, “completed”: false, “due_on”: null, “name”: “Testing task, please do not delete” },
(skipped) ] }

Could you provide some help?

1 Like

Hi @skai_yeung, I can reproduce the behavior.
Asana API returns the correct tasks when I pass the actual YYYY-MM-DD date to the due_on parameter. However, it seems due_on=null is not working correctly and it’s swapped with the search not specifying “due_on”.
I think we’ll need to wait for the Asana team to help us.

Hi @ShunS. Thanks for the reproduction.

@skai_yeung Thank you for the reproduction and screenshots. We have determined that this was a bug related to the filtering logic for null due dates for this endpoint. A fixed has been deployed and you should now be able to filter for tasks that do not have a due date.

2 Likes