Tasks Query completed_since is broken for sections

Hi there, I think the completed_since parameter for task query is broken for sections. I was only able to use it for the projects and all the tasks I want appears. However, if I try this for a section, I get an array with all of the tasks in the section. Can you look into this? Thanks in advance!

@johnnygoodnow, @Matt_Bramlage, and @Jeff_Schneider

Hi @Zhenye_Feng,

Thanks for reaching out. Can you share a bit more about what you’re trying to accomplish (as well as the code)? I’m not exactly certain what you’re building.

Hi @Jeff_Schneider,

Thanks for replying! I’m trying to build a custom script that auto-completes tasks in a specific section. So I decided to query for all the incomplete tasks within a section with https://app.asana.com/api/1.0/tasks?completed_since=now&section=SECTION#, however, I get all of the tasks back from that section instead of the incomplete ones. If I do https://app.asana.com/api/1.0/tasks?completed_since=now&project=PROJECT# then I was able to grab all incomplete tasks for that project back.

I would love to hear your feedback for this and if there is any ways around this!

Hi @Zhenye_Feng, thanks for providing the additional context. While what you’re building is certainly possible, it will require some client-side filtering.

We do hope to add more search features to the API in the nearish future. For now, you will need to request all incomplete tasks with their membership in the project (GET /projects/<project-id>/tasks?opt_expand=memberships&completed_since=now). Then iterate over these tasks to see which ones are in your desired section.

For board view projects only, you can GET /sections/section-id/tasks to request all the tasks within a column.

Good luck!

Hi @Jeff_Schneider, thanks for the helpful suggestion. I was wondering if GET /sections/section-id/tasks?completed_since=now works or it is only a feature for projects.

It only works for board view projects. Not list view.

We do have board view enable, but the tasks?completed_since=now doesn’t seem to be working with sections.

1 Like

Just got the same issue… if I query for tasks for a section, using both methods:

  1. /sections/xxx/tasks
  2. /tasks/?section=xxx
    the completed_since=now is ignored.

There’s no indication in the api documentation that this filter is not working if we use section filtering.

I just tried the modified_since filter too, and it is also ignored if we filter by section from both endpoint.

1 Like