Skip to content

fix: set default cancellation fields values when empty - #246

Merged
mdiapenabc merged 1 commit into
release/cra-file-transfer-enabledfrom
fix/default-cancellation-fields
May 13, 2026
Merged

fix: set default cancellation fields values when empty#246
mdiapenabc merged 1 commit into
release/cra-file-transfer-enabledfrom
fix/default-cancellation-fields

Conversation

@mdiapenabc

Copy link
Copy Markdown
Collaborator

Description

The system was not applying these defaults, so contacts with null careEndDate or cancelReasonCode showed blank fields in Batch Details and Batch History.

What Changes

  • addContactsToPendingBatch(): when transaction type is cancellation, default careEndDate to system date and cancelReasonCode to "21" if blank on the contact record
  • findContactBatches(): return cancelReasonCode and cancelReasonLabel in Batch History response (was missing; already present in findBatchContacts for Batch Details)
  • getCancelReasonLabel(): extract shared helper to eliminate duplicated cancel reason label lookup between findBatchContacts and findContactBatches
  • Tests: 3 new test cases for the defaulting logic: defaults applied when blank, no overwrite when populated, no defaulting for application contacts

@mdiapenabc
mdiapenabc requested a review from saifrazabc May 13, 2026 04:15

@saifrazabc saifrazabc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for set default cancellation fields values when empty

@mdiapenabc
mdiapenabc merged commit c05f08f into release/cra-file-transfer-enabled May 13, 2026
17 checks passed
@mdiapenabc
mdiapenabc deleted the fix/default-cancellation-fields branch May 13, 2026 04:53
mdiapenabc added a commit that referenced this pull request May 13, 2026
chore: set correctly default cancellation fields values (#246)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants