Skip to content

[Customer Portal][BE] Fix engagementPaymentType type mismatch issue - #345

Merged
Rashmika998 merged 1 commit into
wso2-open-operations:customer-portal-milestone-1from
Rashmika998:customer-portal-milestone-1-projects
Mar 16, 2026
Merged

Rashmika998 merged 1 commit into
wso2-open-operations:customer-portal-milestone-1from
Rashmika998:customer-portal-milestone-1-projects

Conversation

@Rashmika998

@Rashmika998 Rashmika998 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • Fix engagementPaymentType type mismatch issue.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Refined payment type data handling in case responses to improve system consistency and reliability. Updated the internal data structure for payment type information to ensure more stable data formatting and processing. These backend improvements enhance how payment information flows through the customer portal, supporting better overall application stability.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b80c0225-8bfd-438c-81a3-f96aa2a2d13b

📥 Commits

Reviewing files that changed from the base of the PR and between 7e89374 and 4efa0f7.

📒 Files selected for processing (2)
  • apps/customer-portal/backend/modules/entity/types.bal
  • apps/customer-portal/backend/utils.bal

📝 Walkthrough

Walkthrough

This PR updates the engagementPaymentType field in the CaseResponse type from ReferenceTableItem to ChoiceListItem, and modifies the corresponding mapping logic in utils.bal to transform the field data from the new structure, including converting id to string format and relabeling the name property.

Changes

Cohort / File(s) Summary
engagementPaymentType Type Update
apps/customer-portal/backend/modules/entity/types.bal
Changed engagementPaymentType field type from ReferenceTableItem to ChoiceListItem in the CaseResponse record definition.
engagementPaymentType Mapping Logic
apps/customer-portal/backend/utils.bal
Updated mapCaseResponse function to handle ChoiceListItem structure: converts id to string via toString() and maps label property instead of name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Type/Improvement

Suggested reviewers

  • cloby99
  • shayanmalinda
  • sacheeramesh

Poem

🐰 A field hops from one shape to another,
ChoiceList now where Reference once stood,
String conversions and labels renamed,
The mapping dances to its new tune,
Better data shape for the path ahead! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is minimal and lacks required sections such as Purpose, Goals, Approach, and other template sections specified in the repository guidelines. Expand the description to include Purpose (with issue links), Goals, Approach, Release notes, and other relevant template sections to provide complete context for the change.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a type mismatch issue with engagementPaymentType in the Customer Portal backend.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.

Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present.

@Rashmika998
Rashmika998 merged commit e0e4612 into wso2-open-operations:customer-portal-milestone-1 Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants