Closed ershad-paladin closed 2 weeks ago
The changes introduce audit trail enhancement and policy handling improvements. Key modifications include updating AuditUtils
methods to work with maps instead of Annotation
objects, reordering imports, adding the POLICY_DISABLED_MSG
constant, and additional logic in PolicyExecutor
for closed audits when policies are disabled.
Files | Change Summary |
---|---|
.../impl/AnnotationPublisher.java |
Imported AuditUtils , reordered imports, modified audit-related logic |
.../util/AuditUtils.java |
Refactored methods to accept maps instead of Annotation objects |
.../util/CommonUtils.java |
Modified getUniqueAnnotationId method to accept a map instead of an Annotation object |
.../common/PacmanSdkConstants.java |
Added POLICY_DISABLED_MSG constant |
.../executor/PolicyExecutor.java |
Included condition for reasonToClose for policy status and updated related method call |
Objective | Addressed | Explanation |
---|---|---|
Missing audit log entry for "Closed" Status when policy is disabled (CORE-1833) | ✅ |
Whiskers wiggled, code refined, Audit trails kept in mind. Policies now whisper "close", As maps replace the Annotation prose. Constants added, imports neat, Every line a tidy feat.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
4 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
tested screenshot:
Description
Problem
audit log entry is missed when dangling issues are closed by policy executor
Solution
made AuditUtils.postAuditTrail generic and used the same common method to insert audit log when dangling issues are closed
Fixes # (issue if any)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
Other Information:
List any documentation updates that are needed for the Wiki
Summary by CodeRabbit
New Features
POLICY_DISABLED_MSG
to communicate disabled policy status.Improvements
AuditUtils
to accept map structures instead of specific objects.Bug Fixes
PolicyExecutor
with a new condition based on policy status.Refactor
AuditUtils
andCommonUtils
for accepting map structures.