AMM-1266 | 1449 | Record incorrectly moved from ANM worklist when HRP is no and call disconnected is YES#68
Conversation
Feature/version/upgrade
pull latest code 26sept
latest pull 2102
pull latest code
|
""" WalkthroughThe update refactors logic in the Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java (1)
86-302: 💡 Verification agent🧩 Analysis chain
Request verification for comprehensive test coverage.
The
closeCallmethod is quite large (200+ lines) with complex conditional logic. Since this change affects how records move between worklists, comprehensive testing would be valuable.Please ensure tests cover the following scenarios:
- When HRP=true and role=ANM: record should move as expected
- When HRP=false and role=ANM: record should NOT move (this is the bug fix)
- When role is not ANM: verify behavior with both HRP values
🏁 Script executed:
#!/bin/bash # Look for existing tests for the closeCall method grep -r "test.*closeCall" --include="*.java" .Length of output: 48
🏁 Script executed:
#!/bin/bash # Check for any tests referencing the closeCall method grep -R "closeCall" -n src/test/java || echo "No occurrences of closeCall in tests" # Check for any tests referencing the CallClosureImpl class grep -R "CallClosureImpl" -n src/test/java || echo "No occurrences of CallClosureImpl in tests"Length of output: 257
Add comprehensive unit tests for closeCall in CallClosureImpl
No existing tests reference
closeCallorCallClosureImpl. Please add unit tests covering these critical scenarios:
- HRP = true and receivedRoleName = ANM: the record should reopen and unallocate (bug fix behavior).
- HRP = false and receivedRoleName = ANM: the record should remain completed (verify no regression).
- Any other role (non-ANM) with HRP = true and HRP = false: confirm call status and allocation logic.
🧹 Nitpick comments (1)
src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java (1)
223-235: Improvement in conditional logic addresses the ANM worklist issue.The new implementation correctly addresses the issue described in PR AMM-1266 by only performing the call status reset and worklist changes when both conditions are met: HRP is true AND the role is ANM. This prevents records from being incorrectly moved when HRP is marked as "no".
I also notice a commented line (233) that hints at a potential future enhancement to change the role to "MO". If this is planned for future implementation, consider adding a TODO comment to clarify the intention.
if (isHrp && obj.getReceivedRoleName().equalsIgnoreCase(Constants.ANM)) { callObj.setCallStatus(Constants.OPEN); callObj.setAllocatedUserId(null); callObj.setAllocationStatus(Constants.UNALLOCATED); callObj.setCallAttemptNo(0); - // callObj.setRole(Constants.MO); + // TODO: Future enhancement - change role to MO when appropriate }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java (1)
src/main/java/com/iemr/ecd/utils/constants/Constants.java (1)
Constants(5-21)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (java)
🔇 Additional comments (2)
src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java (2)
213-221: Good: Commenting out the problematic code.The previous implementation would reset call status and move records from ANM worklist regardless of the HRP value, which was causing the issue mentioned in the PR. Removing this logic is appropriate.
223-225: Using a local variable improves code readability.Good practice to extract the boolean value into a local variable before using it in conditional logic. This makes the code more readable and easier to debug.
|



📋 Description
JIRA ID:
AMM-1266 | 1449 |
Record incorrectly moved from ANM worklist when HRP is no and call disconnected is YES
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit