Skip to content

Conversation

@jessevz
Copy link
Contributor

@jessevz jessevz commented Sep 17, 2025

Fixed a bug in pagination where filters where not used for the pagination database query.

@jessevz jessevz requested review from Copilot and s3inlc September 17, 2025 07:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in pagination where database queries were not applying user-defined filters when paginating through results. The fix ensures that pagination queries include the same filters as the original query, providing consistent and accurate pagination behavior.

  • Added a new $filters parameter to the PaginationFilter constructor to pass query filters
  • Updated pagination query generation to include filter conditions alongside pagination logic
  • Modified value retrieval to include filter parameter values for prepared statements

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/inc/apiv2/common/AbstractModelAPI.class.php Passes existing query filters to the PaginationFilter constructor
src/dba/PaginationFilter.class.php Adds filter support to pagination queries by accepting filters parameter and incorporating them into SQL generation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jessevz jessevz merged commit 2eddaa8 into dev Sep 24, 2025
2 checks passed
@jessevz jessevz deleted the fix-bug-pagination branch September 24, 2025 14:57
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.

3 participants