Call status open if language not mapped#85
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe conditional logic in Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant CallClosureImpl
participant UserAllocation
Caller->>CallClosureImpl: Close call with callType and language mapping
alt Language not mapped and callType is "introductory" or "ANM"
CallClosureImpl->>UserAllocation: Clear allocatedUserId
CallClosureImpl->>UserAllocation: Set callStatus to OPEN
CallClosureImpl->>UserAllocation: Reset callAttemptNo to 0
CallClosureImpl->>UserAllocation: Set allocationStatus to UNALLOCATED
else Other cases
CallClosureImpl->>UserAllocation: Proceed with standard closure logic
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (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.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🛑 Comments failed to post (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (1)
132-132: 💡 Verification agent
🧩 Analysis chain
Verify impact on total allocated counts.
The addition of
(t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL)condition to total allocated count queries changes the counting logic. Ensure this aligns with business requirements - previously allocated calls that don't require further calls will no longer be counted.Run the following script to verify the impact of this change:
Also applies to: 139-139
🏁 Script executed:
#!/bin/bash # Description: Check for any existing tests or documentation that might be affected by the count query changes # Search for test files that might test these count methods fd -e java -t f | xargs rg -l "getTotalAllocatedCount" # Search for any documentation or comments about these count methods rg -A 5 -B 5 "getTotalAllocatedCount"Length of output: 5950
Missing tests and documentation for updated count logic
File: src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java
Lines: 132 (getTotalAllocatedCountMother) and 139 (getTotalAllocatedCountChild)We’ve added
… AND (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL)to both count queries, which now exclude records where
isFurtherCallRequired = false. Running:fd -e java -t f | xargs rg -l getTotalAllocatedCount rg -A 5 -B 5 getTotalAllocatedCountshowed no existing unit/integration tests or documentation covering these methods. To ensure correct behavior:
- Add or update tests under src/test/java to cover all three states of
isFurtherCallRequired(true, false, null) for bothgetTotalAllocatedCountMotherandgetTotalAllocatedCountChild.- Update any design docs, README sections or inline comments describing the allocated-count logic to note that calls flagged as “no further call required” are now omitted.
🤖 Prompt for AI Agents
In src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java at lines 132 and 139, the count queries for getTotalAllocatedCountMother and getTotalAllocatedCountChild now exclude records where isFurtherCallRequired is false by adding the condition (t.isFurtherCallRequired = true OR t.isFurtherCallRequired IS NULL). To fix this, add or update unit and integration tests in src/test/java to cover all three states of isFurtherCallRequired (true, false, null) for both methods, ensuring the counting logic is correctly validated. Also, update any relevant design documentation, README files, or inline comments to reflect this change in allocated-count logic, explicitly noting that calls marked as no further call required are excluded.



📋 Description
JIRA ID:
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
✅ 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