A Better Way to Recreate My Tasks?

I’m trying to recreate the data from "My Tasks"within our integration (for scheduling and tracking time against the tasks) so users can find their tasks more easily under sections.

The only way I’ve been able to achieve this is:

  • GET users/me/user_task_list to get the My Task ID (which is the project ID).
  • GET projects/:id/sections to get the sections from My Tasks.
  • GET sections/:id/tasks to get the tasks within each section.

That works, but it requires pulling all tasks and of course multiple requests. We can store the user_task_list ID, but the sections and tasks within the sections would have to be pulled every time.

My test workspace has a handful of sections and ~1,000 tasks. In the third step I’m pooling the tasks requests to send them concurrently, but in my testing thus far, this entire process can still take anywhere from 6-19 seconds from first request to final response.

Ideally, I’d just take the user_task_list ID and send a single request to projects/:id/tasks with a limit and be able to paginate through the tasks as needed. This will return the tasks in the correct order and the initial response is significantly faster with a single request with a size limit, but I can’t seem to get the sections this way.

In the response from Asana, memberships does not include the My Tasks project and sections, just “real” projects and sections the task is associated with.

Is there another way to go about this that I haven’t found or is there a plan to include the My Tasks membership info with the response in the future? Ideally for this situation, when the user makes a request to projects/:id/tasks with the id being their own My Tasks project ID, then the My Tasks membership info would be included.

The Asana app appears to be doing just this, as it is lazy loading tasks and sections in My Tasks. I’d like to approach this the same way!

1 Like

I would just use Unito.io which can live sync your My Tasks to wherever you want. Automation before frustration.

1 Like

Yes, this is a very unfortunate oversight by the API team when the new My Tasks was introduced a few months back. See also:

Sadly no. The only (ugly) workaround is the one you already found and mentioned in your initial post (and which I mention in the refenced post above).

Happily, yes! They will be filling this “hole”. I don’t know exactly when but I continue to push them for it ASAP.

FYI I also don’t know for sure that their solution will be to populate the memberships property (the argument against it is that tasks don’t show their My Tasks memberships on the task UI), so don’t count on that as being the specific route to the solution, they may come up with something else - but some solution should be coming.

1 Like

Unless they’ve implemented the same workaround that @anthonycreek mentioned, they’ll have the same issue of not knowing what section a task is in within a new My Tasks view (but perhaps they did implement it, IDK).

1 Like

Thanks for the confirmation @Phil_Seeman. I’ll continue with just pulling tasks for now then and add sections when there is a better way available from Asana.