Read tasks limiting those with a specific assignee_status

Hello Everyone,

I have implemented a small web app that allows me to print the tasks in “My Tasks”. One of the issues I have is that when I gather my tasks, I cannot limit the tasks to those that are in “Today” or “Upcoming” by passing a value in the query for the parameter “assignee_status”.

Is this supported and I haven’t found the right way of doing it?

I am using the PHP extension and the call I use is this:

$asanaTasks = $this->asana->tasks->findAll(
            'assignee' => $this->asanaUser,
            'workspace' => $this->asanaWorkspace,
            'completed_since' => 'now',
            'assignee_status' => 'upcoming'
        array('fields'=>array('name', 'assignee_status'))

As you can see I request the assignee_status to be passed in the fields and I require only the assignee_status which are upcoming; however, this does not seem to be working.

Any suggestions?


1 Like

Hey @Carlo,

As you can read from the API documentation for the task queries you cannot search the tasks by the assignee_status. You will need to get all the tasks with assignee/workspace/completed_since and filter out the tasks with assignee_status as ‘upcoming’.

ps. @Alexis the documentation page has some issues with the styling (some text is out of the tables)

1 Like

Thanks @Diakoptis

I looked in the documentation, but I must have missed it.
The solution you proposed is the one I use, but I was trying to save time in fetching less tasks! :smiley:


1 Like

Glad I helped @Carlo :slight_smile:

I am also feeling that search tasks api needs some enhancements but I am not sure that this is a priority for asana dev team.

1 Like

Asana developer advocate here – we too would like to enhance task filtering in the API. While we haven’t scoped or committed to the work yet, it is something we would like to improve in the API.

1 Like

Hi @Jeff_Schneider

The filtering is a “nice to have” feature, but as you filter before the call, you can easily filter the results after the call. It is a bit slower, as you have to get all the information first and discard them later, but works…


1 Like