Skip to content

AUDIT-28: Fix missing audit data when paginating across multiple entity types#38

Open
shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
shubhangiisinghh:AUDIT-28
Open

AUDIT-28: Fix missing audit data when paginating across multiple entity types#38
shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
shubhangiisinghh:AUDIT-28

Conversation

@shubhangiisinghh
Copy link
Copy Markdown

AUDIT-28: Fix missing audit log entries across paginated entity types

Description of what I changed

The fetchAcrossEntities method in AuditDao was passing the user's
requested page and size directly to each individual entity query.
This caused records from entity types with small record counts to be
completely skipped before the combined sort and pagination step.

Fixed by changing the per-entity fetch to always start from page 0
and use a window of (page + 1) * size records, ensuring all relevant
records from every entity type are included before final pagination.

Issue I worked on

see https://openmrs.atlassian.net/browse/AUDIT-28

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.
  • I have added tests to cover my changes.
  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.
  • All new and existing tests passed.
  • My pull request is based on the latest changes of the master branch. --rebase upstream master`

@Binayak490-cyber
Copy link
Copy Markdown

Hi @shubhangiisinghh, I think this is a wrong PR and a wrong place where the fix is being done as the fix is in openmrs-core repo which is already going on in this PR - openmrs/openmrs-core#5933

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