Skip to content

AUDIT-30: Fix changes not visible when filters applied in audit log view#42

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

AUDIT-30: Fix changes not visible when filters applied in audit log view#42
shubhangiisinghh wants to merge 1 commit intoopenmrs:mainfrom
shubhangiisinghh:AUDIT-30

Conversation

@shubhangiisinghh
Copy link
Copy Markdown

Title: AUDIT-30: Fix changes not visible when filters applied in audit log view

Description of what I changed

In AuditLogViewService.fetchAuditLogsGlobal, the else branch was calling
getAllRevisionsAcrossEntities which does not respect filters correctly.
Replaced it with getAllRevisionsAcrossEntitiesWithEntityType (passing null
for entityType) so that username and date filters are properly applied.

Also fixed a redundant double userId resolution -the username string was
being passed into fetchAuditLogs and resolved to a userId a second time,
when it had already been resolved into filters.getUserId().

Issue I worked on

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

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.
  • All new and existing tests passed.
  • My pull request is based on the latest changes of the master branch.

@sudhanshu-raj
Copy link
Copy Markdown

I noticed this PR is linked to the AUDIT-30 Jira ticket. Just wanted to confirm if this change is part of that ticket’s scope. Also, I think there might already be a PR associated with it. Could you please take a look?

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