Skip to content

fix(taiga): page through epics, issues, tasks and user stories - #9341

Open
ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/taiga-pagination
Open

ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/taiga-pagination

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

The Taiga collectEpics, collectIssues, collectTasks and collectUserStories subtasks only collected the first 30 items of a project.

Their Query sent only project. Taiga list endpoints are paginated (PAGINATE_BY: 30 in taiga-back) unless x-disable-pagination is sent, and return page 1 when no page is given. Each response had 30 items, which is less than PageSize: 1000, so the ApiCollector stopped after one page. The collector fetched pages 1..10 in parallel and all ten requests were identical, so the raw tables also held the same 30 rows ten times.

Changes:

  • tasks/shared.go (new):
    • taigaProjectListQuery sends project, page and page_size. The page size is 1000, Taiga's MAX_PAGINATE_BY.
    • getNextTaigaPage ends the collection when the response has no X-Pagination-Next header. Taiga answers a page past the last one with 404, so a full last page must not lead to another request. Setting GetNextPageCustomData also makes the collector fetch pages one at a time instead of guessing 10 pages in parallel.
  • The four collectors use these two helpers. Request URLs, raw tables and extractors are unchanged.
  • tasks/shared_test.go (new): checks the query params, and checks that the next-page function stops with and without the header.

Does this close any open issues?

Closes #9340

Screenshots

N/A

Other Information

  • go test ./plugins/taiga/tasks/...: pass. The query test fails on the old query (page and page_size are empty).
  • go vet ./plugins/taiga/... and gofmt: clean. The e2e tests need E2E_DB_URL and don't cover the collectors.
  • No open PR touches the taiga plugin.
  • Suggested label: pr-type/bug-fix.
  • AI assistance disclosure: this change was prepared with the help of Claude Code (Claude Opus 5.5). I reviewed the diff and the taiga-back pagination code it relies on (taiga/base/api/pagination.py). The commit carries a Generated-by: trailer per the ASF generative tooling guidance.

🤖 Generated with Claude Code

The four collectors sent only the project filter. Taiga list endpoints
are paginated (30 items per page by default) and return page 1 when no
page is given, so only the first 30 items of a project were collected,
and the parallel page fetches stored the same page ten times. Send page
and page_size, and stop when Taiga reports no next page, since a page
past the last one returns 404.

Closes apache#9340

Generated-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Taiga] Epics, issues, tasks and user stories: only the first 30 are collected

2 participants