Skip to content

[Customer Portal][BE] Add user who reported the time card - #500

Merged
cloby99 merged 1 commit into
wso2-open-operations:dev-app-customer-portalfrom
Rashmika998:dev-app-customer-portal
Apr 17, 2026
Merged

cloby99 merged 1 commit into
wso2-open-operations:dev-app-customer-portalfrom
Rashmika998:dev-app-customer-portal

Conversation

@Rashmika998

@Rashmika998 Rashmika998 commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Add user who reported the time card

Summary by CodeRabbit

  • New Features
    • Time card records now include information about the user who reported the time card, enhancing visibility into time card creation and approval workflows with complete user attribution data.

@Rashmika998 Rashmika998 self-assigned this Apr 17, 2026
@Rashmika998 Rashmika998 changed the title [Customer Portal][BE] Sdd user who reported the time card [Customer Portal][BE] Add user who reported the time card Apr 17, 2026
@coderabbitai

coderabbitai Bot commented Apr 17, 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: 3d74f105-2ec3-4226-b38e-fbf17c7f1322

📥 Commits

Reviewing files that changed from the base of the PR and between 0d79ff1 and d275da6.

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

📝 Walkthrough

Walkthrough

The changes extend the TimeCard record type across two modules by adding optional user reference fields (user and reportedBy), and update the mapping function to include the new reportedBy reference when constructing TimeCard objects from search responses.

Changes

Cohort / File(s) Summary
TimeCard Type Extensions
apps/customer-portal/backend/modules/entity/types.bal, apps/customer-portal/backend/modules/types/types.bal
Added optional user reference fields to TimeCard record: user: ReferenceTableItem? in entity module and reportedBy: ReferenceItem? in types module, extending the time card data structure.
TimeCard Mapping Update
apps/customer-portal/backend/utils.bal
Updated mapTimeCardSearchResponse function to extract and map the user field from timeCard as reportedBy: {id, label} in the returned types:TimeCard objects, with null handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Type/Improvement

Suggested reviewers

  • cloby99
  • shayanmalinda

Poem

🐰 A user's touch on every card,
Now tracked from start to signed regard—
The reportedBy field hops in place,
Reference fields embrace,
Time cards wear a friendly face! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is extremely minimal and missing most required template sections (Purpose, Goals, Approach, User stories, Release note, Documentation, etc.). Complete the pull request description using the provided template, including Purpose, Goals, Approach, Release note, Documentation, and other applicable sections.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a user field to track who reported the time card 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

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.

@Rashmika998
Rashmika998 requested a review from cloby99 April 17, 2026 08:04
@cloby99
cloby99 merged commit 4d78216 into wso2-open-operations:dev-app-customer-portal Apr 17, 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