Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:enable Mongo Auditing #473

Merged
merged 4 commits into from
Nov 20, 2023
Merged

feat:enable Mongo Auditing #473

merged 4 commits into from
Nov 20, 2023

Conversation

hihilary
Copy link
Contributor

@hihilary hihilary commented Nov 16, 2023

  1. This config will enable the annotation @LastModifiedDate in DoctorsForDB entity, so anywhere when doctorsForDBRepository.save() is called, lastUpdatedDate will be updated.

  2. I've found for Recommendation Status Check job, the update of doctorStatus in DoctorsForDB collection doesn't update the field lastUpdateDate, see code here, but this PR will update lastUpdatedDate.

  3. I tried adding the annotation in main class first, but found it caused all WebMvcTest failing because of no Mongo Auditing related beans were found. So I created another empty config class to do the annotation. TBH, This new annotation can be configured after any @Configuration annoation.

  4. Tested locally.

TIS21-5224

@hihilary hihilary requested review from a team, JosephKelly and CaiWillis and removed request for a team November 16, 2023 12:00
@hihilary hihilary marked this pull request as ready for review November 16, 2023 12:00
this config will enable the annotation @LastModifiedDate in DoctorsForDB entity,
so anywhere when `doctorsForDBRepository.save()` is called, lastUpdatedDate will
be updated.

TIS21-5224
TIS21-5224
Copy link

sonarcloud bot commented Nov 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

50.0% 50.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@hihilary hihilary merged commit 8d50c6c into main Nov 20, 2023
3 checks passed
@hihilary hihilary deleted the feat/enableMongoAuditing branch November 20, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants