AUDIT-28: Fix missing audit data when paginating across multiple entity types#38
Open
shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
Open
AUDIT-28: Fix missing audit data when paginating across multiple entity types#38shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
Conversation
|
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 |
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.
AUDIT-28: Fix missing audit log entries across paginated entity types
Description of what I changed
The
fetchAcrossEntitiesmethod inAuditDaowas passing the user'srequested
pageandsizedirectly 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) * sizerecords, ensuring all relevantrecords 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 :)
mvn clean packageright before creating this pull request andadded all formatting changes to my commit.