Skip to content

Fix: Adjust pagination metadata when fetching projects with an assignee filter#18

Merged
welias merged 1 commit intomainfrom
fix/project-list-pagination
Mar 12, 2026
Merged

Fix: Adjust pagination metadata when fetching projects with an assignee filter#18
welias merged 1 commit intomainfrom
fix/project-list-pagination

Conversation

@gabrielvmayer
Copy link
Contributor

Description

This PR fixes a pagination bug in the projects list command. Previously, when using filters that required fetching all pages and processing them locally (e.g., filtering by assignee), the command still parsed the raw API metadata for totalPages and totalCount. This led to a misleading summary indicating many pages (like "Page 1/36") even when the local filtering only returned a handful of results that fit completely on a single page.

The output logic has been updated so that when fetch_all is triggered, the displayed "total pages" and "total items" are correctly calculated from the localized result set.

How to Test

  1. Run python -m conviso.app projects list --company-id <ID> --filter assignee=<EMAIL>.
  2. Observe the output summary in the footer and title.
  3. Expected behavior: The pagination metrics should represent the exact number of matching projects found and should display as page 1/1 rather than retaining the unfiltered total counts from the initial API metadata.
  4. Run without the assignee filter and verify that normal pagination limits remain standard and unbroken.

@welias welias merged commit b0db123 into main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants