Repository navigation
fix(teambition): collect all pages when pageSize is not set - #9429
Open
ShivamSharma43 wants to merge 1 commit into
Open
ShivamSharma43 wants to merge 1 commit into
ShivamSharma43 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unless the task options set
pageSize, the Teambition collectors only collect the first page of each list.TeambitionOptions.PageSizeis never defaulted, soApiCollectorArgs.PageSizeis 0. In that caseApiCollector.execdoes a singlefetchAsync(reqData, nil)and never callsGetNextPageCustomData. NopageSizeis 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 passdata.Options.PageSize: projects, sprints, tasks, task activities, task flow statuses, task scenarios and task tags.DecodeAndValidateTaskOptionsnow defaults it to 50, the valueremote_api.goalready uses for this API. An explicitpageSizestill wins. All seven endpoints acceptpageSizeandpageToken: the recorded requests ine2e/raw_tables(made withpageSize=1) use them, apart from projects, where onlypageSizewas needed.Does this close any open issues?
No issue is open for this. The bug is described above.
Screenshots
N/A
Other Information
TestDecodeAndValidateTaskOptionsPageSizechecks the default and an explicitpageSize. Without the change it fails (expected 50, actual 0).go test ./plugins/teambition/tasks/,go vet ./plugins/teambition/...andgofmtare clean. The e2e tests were not run: they start from raw tables, so they don't go through the collectors.remote_api.go.pr-type/bug-fix.Co-Authored-By:trailer.🤖 Generated with Claude Code