Get tasks from a project returns different number of tasks depending on page limit provided.

Hi Asana Community,

I hope you’re all doing well. I’m reaching out to report an issue we’re encountering when fetching tasks for a project. The project contains 110 tasks, but we’re seeing inconsistent results depending on the page size limit used.

When we set the page size limit to 10, we receive only 92 tasks in total, with the last page containing just 2 tasks. However, when we set the page size limit to 100, we receive all 110 tasks, with 10 tasks on the last page.

This behavior is observed both when using the Asana Node.js SDK and on the API reference page (Get tasks from a project).

API request:

curl --request GET
–url ‘https://app.asana.com/api/1.0/projects/{project_gid}/tasks?limit=10
–header ‘accept: application/json’
–header ‘authorization: Bearer {token}’

Please let me know if any additional details are required from my side. Any insights or suggestions would be greatly appreciated!

Regards,
Dawood

3 Likes

I can confirm i have the same issue.

3 Likes

Hi @Kem_Ozbek, do you have any at your team that could have a look at this bug? Thanks :slight_smile:

2 Likes

@John_Baldo @David_Neal

3 Likes

I have a similar issue. Most times I get all the tasks for a project, but every like 6 or 7 days I get about 3,100 out of 3,400 with no error returned. The most recent time this happened was this Sunday night.

2 Likes

We’re also seeing this recently. With 100 we’re getting 471 tasks, when there are 500+. With 10/page we’re seeing even less.

2 Likes

"I have a Python code with a similar problem.
The URL is: https://app.asana.com/api/1.0/projects/ + project + /tasks?limit=100 + fields.

I have a project with 5019 tasks. However, when I set the limit to 100, I only get 200 tasks. But when I change this parameter, for example, setting the limit to 95, I get all the tasks in the project.

This issue happens with some projects."

Let me know if this works for you!

3 Likes

No - it doesn’t work for me. The dashboard count 1572 tasks - without subtasks.

1 Like

Hey @Phil_Seeman, who can we tag to get a response, do you know? :slight_smile:
I would say this should be high priority for the api team, core functionality not working as intended causing unknown amount of faulty data for unknown amount of clients over unknown amount of time, kind of significant.

@JFrentz I’ve highlighted this thread to some of my Asana contacts.

1 Like

Hi everyone! I wanted to let you know that we’re aware of this issue and are actively working on a fix.

We conducted an investigation and discovered that this issue occurs when you have a project with sections and make a request with a pagination limit. If at any time the limit you specified coincides with the end of a section, the pagination ends early. This is the bug we have identified.

Here’s an example explanation of a scenario when this will happen:

  • PROJECT_A has a section called SECTION_1
  • PROJECT_A has a section called SECTION_2
  • SECTION_1 has 5 tasks
  • SECTION_2 has 10 tasks
  • You make an API call to Get multiple tasks endpoint and specify a limit of 5 the API will return next_page of null after those 5 tasks → technically this should not happen and it should return 15 tasks, so this is the bug that we are currently fixing.

I’ve provided a similar explanation in this comment Problem with next_page

Thanks @Phil_Seeman for flagging this to us

3 Likes

Hi Everyone, this issue has been fixed. If you are still running into this issue please let us know.

3 Likes