Use `without_count` for audit event records paginated with `paginate_without_counts`
What does this MR do?
Fix 1 (backend change only, no visible UI change):
While working on the comment !20912 (comment 254868656), I noticed that in Admin Audit Events, even while using
paginate_without_counts for pagination, the records itself do not have
without_count called on them, and this
leads to a count query being executed anyway.
So, it is essential that we call
without_count on the ActiveRecord collection, when paginating using
This is how pagination without page numbers looks like (current behaviour in Admin Audit Logs UI)
Update: This change is dropped from this MR as per discussion with UX. Commit has been rebased to only include changes in Fix 1.
I also noticed that in
Group Audit Logs UI, we paginate with page numbers - which is different from what we follow in Admin Audit Logs - where we paginate without page numbers.
Hence, to bring feature parity between the two, I have changed pagination in
Group Audit Logs UI to use pagination without page numbers.
Before: Pagination has page numbers (this is different from the behaviour in Admin Audit Events UI) After: Pagination does not have page numbers (this is in-line with current behaviour in Admin Audit Events UI)
Does this MR meet the acceptance criteria?
- Changelog entry
- Documentation (if required)
- Code review guidelines
- Merge request performance guidelines
- Style guides
- Database guides
- Separation of EE specific content
Availability and Testing
- Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- Tested in all supported browsers
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
Label as security and @ mention
- The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- Security reports checked/validated by a reviewer from the AppSec team