Getting asana “now” tasks and “today” tasks under project and user via API

StackOverflow https://stackoverflow.com//questions/11660005

  •  11-12-2019
  •  | 
  •  

Вопрос

From within Asana, we can see how the tasks are split into "Now", "Next" and "later" in project view as well as "Today", "Upcoming" and "later" in user. I can't seem to find the API required to identify the tasks in each category. Is this functionality available for developers?

Это было полезно?

Решение

(I work at Asana)

In the reference for Tasks at https://asana.com/developers/api-reference/tasks, the docs describe the assignee_status field. This will give you the today/upcoming/later status for a task assigned to a user.

In project view, these statuses don't exist so I assume that by now/next/later you are referring to "priority headings", or arbitrary labels that you are able to create inside any list by ending the name of a task with a colon (:). There is not currently a way to find out which priority heading a task is under via the API.

If knowing the priority heading containing a task is important, you could iterate over the results (which by default show up in the same order they do in the UI), keeping track of which priority heading you saw last. This is inelegant and prone to problems if you filter the task list in some way (and possibly don't get all the priority headings as a result), but it might help you get the job done until a better solution is provided.

If you are querying for a list of tasks, make sure you add the opt_fields=assignee_status parameter and that field will be provided in each of your results.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top