List tasks for tag API only returns incomplete recent tasks when modified_since is long ago

We’re seeing really odd behavior from the API for recent tasks (created in the last month) when listing tasks with a modified_since older than ~mid-January 2019. We’re paginating through the full result set, and for tasks created recently, we only see incomplete ones. The result set eventually starts to include complete tasks as well. It always seems to include complete tasks before September of this year. Setting modified_since to January 2018 works as we expect except for tasks created after August 31, 2020 — we only get incomplete tasks for September on. If modified_since is set to something more recent, both complete and incomplete tasks are returned as expected.

Here’s the query URL:

https://app.asana.com/api/1.0/tags/:tagid:/tasks?limit=100&opt_fields=assignee.email,assignee.name,resource_subtype,created_at,completed_at,name,notes,due_at,due_on,projects.name,tags.name,custom_fields,memberships.section.name&modified_since=:modified_since:

Has anyone else observed this behavior? This looks like a bug to me.

Are you sure this is the same tag that is applied to the missing tasks? And not a tag with the same text but a different gid? I am not sure that makes sense though. Using my tool https://minimalist-work.com/asana/tags might give you a better overview of the tags.

Yep, I’m sure — i can get the API behavior to change simply by changing the “modified_since” value

@Ross_Grambo, any ideas why they’d be seeing this?

Hey @James_Hamlin ,

A couple things here…

First, I’m unable to reproduce this functionality. Here’s what I did, let me know if I missed a step/misunderstood:

  1. Found a tag with items dating back to 2019
  2. Created two new tasks, added this tag to both, and completed one of the tasks
  3. I see both tasks regardless of my modified date (tried 2016-12-19, 2020-09-20, 2019-01-01, 2019-01-30)

Second, modified_since is undocumented. I don’t think it’s a great idea to use it. You could instead manually page on the /search endpoint https://developers.asana.com/docs/search-tasks-in-a-workspace as decribed in this thread: Question about search api + paging

Third, paging using modified_since is overall just not a great idea, as when something changes, items get shifted mid paging so you can’t guarantee you’ll see all the tasks.

1 Like