Skip to content

fix (forms): change api for "Tell Post Office someone died" form#54

Merged
Ethical-Ralph merged 2 commits intodevelopfrom
fix/forms/change-mail-deceased-api
Jan 16, 2026
Merged

fix (forms): change api for "Tell Post Office someone died" form#54
Ethical-Ralph merged 2 commits intodevelopfrom
fix/forms/change-mail-deceased-api

Conversation

@sajclarke
Copy link
Contributor

Description

This PR updates the post-office redirection form for deceased individuals. It includes schema updates to match the Figma design and improves email error handling by gracefully failing if unable to connect to the SMTP server.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

  • Update post-office redirection deceased form schema to match Figma design specifications
  • Add middle name field to deceased person's information
  • Change "applicant" section name to "deceased" for clarity
  • Rename "dateOfBirth" to "dateOfDeath" in the deceased section
  • Remove email and telephone fields from deceased person section
  • Remove ID number and passport number fields from deceased section
  • Update label capitalization (e.g., "Address Line 1" → "Address line 1")
  • Rename "postalCode" to "postcode" for consistency
  • Improve email service error handling to silently fail if SMTP connection is unavailable instead of throwing errors
  • Update email template for post-office redirection notice

Files Changed

  • schemas/post-office-redirection-deceased.json - Form schema updates (152 insertions, 161 deletions)
  • src/email/email.service.ts - Graceful email error handling (6 changes)
  • src/email/templates/post-office-redirection-notice.hbs - Template updates (210 insertions, 161 deletions)
  • src/processors/implementations/email.processor.ts - Email processor changes (41 changes)

Notes

The schema changes align the form structure with the Figma design, removing contact information from the deceased person section and simplifying the form while adding the middle name field. The email service changes ensure the application continues gracefully if email cannot be sent due to SMTP server connectivity issues, rather than throwing an error.

Testing

  • Form validation tested with new schema structure
  • Verify deceased person fields display correctly
  • Test email template renders properly with template updates
  • Verify form submission succeeds even if email fails to send
  • Test all conditional fields work as expected
  • Validate required/optional field constraints
  • Check responsive design on all device sizes

Related Github Issue(s)/Trello Ticket(s)

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated
  • Template changes reviewed

@amazon-inspector-n-virginia
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-n-virginia
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

@sajclarke sajclarke changed the title Fix (forms): change api for "Tell Post Office someone died" form fix (forms): change api for "Tell Post Office someone died" form Jan 15, 2026
@Ethical-Ralph Ethical-Ralph merged commit c6ce265 into develop Jan 16, 2026
2 checks passed
Ethical-Ralph added a commit that referenced this pull request Jan 16, 2026
* Updated missing validation

* Fix (forms): update schema for "redirect business mail" api (#55)

* fix: update schema to match figma

* fix: update form schema and validations for empty strings

* fix: telephone validation in sell goods or services form (#53)

* fix (forms): change api for "Tell Post Office someone died" form (#54)

* fix: update schema for deceased form to match figma

* fix: gracefully fail if unable to connect to smtp server

* chore: update email error logic

---------

Co-authored-by: IsaiahSama <isaiahcarrington46@gmail.com>
Co-authored-by: Akinola Raphael <rakinola90@gmail.com>
@sajclarke sajclarke mentioned this pull request Jan 16, 2026
19 tasks
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