[Customer Portal[BE] Fix active counts to include change requests - #336
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughmapCaseStats's second parameter changes from an optional int to an optional ProjectChangeRequestStatsResponse; the service handler now passes the full change-request stats object when available. Mapping logic uses the object's totalCount and activeCount when provided. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/customer-portal/backend/utils.bal (1)
373-376: Update parameter documentation to reflect expanded usage.The docstring for
changeReqStatsstates it is used for "total interactions", but the parameter is now also used to augmentactiveCount(line 399). Consider updating the doc comment.-# + changeReqStats - Count of change requests to be added to total interactions +# + changeReqStats - Change request stats to be added to total interactions and active count🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/customer-portal/backend/utils.bal` around lines 373 - 376, The doc comment for the mapCaseStats function incorrectly describes the changeReqStats parameter as only being used to "Count of change requests to be added to total interactions"; update the parameter documentation for changeReqStats in the mapCaseStats docstring to state it is used both to add to total interactions and to augment activeCount (used when computing active cases), referencing the function name mapCaseStats and the changeReqStats parameter so future readers know both uses.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/customer-portal/backend/utils.bal`:
- Around line 373-376: The doc comment for the mapCaseStats function incorrectly
describes the changeReqStats parameter as only being used to "Count of change
requests to be added to total interactions"; update the parameter documentation
for changeReqStats in the mapCaseStats docstring to state it is used both to add
to total interactions and to augment activeCount (used when computing active
cases), referencing the function name mapCaseStats and the changeReqStats
parameter so future readers know both uses.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 99fe5651-59e1-49b7-b4b3-a9918c067f10
📒 Files selected for processing (2)
apps/customer-portal/backend/service.balapps/customer-portal/backend/utils.bal
aa0990c
into
wso2-open-operations:customer-portal-milestone-1
Description
This PR updates the active counts logic to include change request–related counts in addition to the existing metrics.
Changes
Reason
Previously, the active counts only reflected case-related activity. Including change request counts provides a more complete view of active work items and improves dashboard reporting and monitoring.
Testing
Impact
Summary by CodeRabbit