Skip to content

fix(teambition): collect all pages when pageSize is not set - #9429

Open
ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/teambition-page-size
Open

ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/teambition-page-size

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

Unless the task options set pageSize, the Teambition collectors only collect the first page of each list.

TeambitionOptions.PageSize is never defaulted, so ApiCollectorArgs.PageSize is 0. In that case ApiCollector.exec does a single fetchAsync(reqData, nil) and never calls GetNextPageCustomData. No pageSize is sent either, so the page has whatever size the server defaults to. Neither the blueprint code of the plugin nor config-ui sets the option. The affected collectors are the seven that pass data.Options.PageSize: projects, sprints, tasks, task activities, task flow statuses, task scenarios and task tags.

DecodeAndValidateTaskOptions now defaults it to 50, the value remote_api.go already uses for this API. An explicit pageSize still wins. All seven endpoints accept pageSize and pageToken: the recorded requests in e2e/raw_tables (made with pageSize=1) use them, apart from projects, where only pageSize was needed.

Does this close any open issues?

No issue is open for this. The bug is described above.

Screenshots

N/A

Other Information

  • New TestDecodeAndValidateTaskOptionsPageSize checks the default and an explicit pageSize. Without the change it fails (expected 50, actual 0).
  • go test ./plugins/teambition/tasks/, go vet ./plugins/teambition/... and gofmt are clean. The e2e tests were not run: they start from raw tables, so they don't go through the collectors.
  • Not run against a live Teambition server. Teambition's public API docs could not be read without a browser, so the maximum page size per endpoint is not confirmed; 50 follows the existing use in remote_api.go.
  • Suggested label: pr-type/bug-fix.
  • This PR was prepared with AI assistance (Claude Code). The commit carries a Co-Authored-By: trailer.

🤖 Generated with Claude Code

ApiCollector fetches a single page when PageSize is 0, and the task option
was never defaulted. Default it to 50, as remote_api.go does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 11:52

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.

2 participants