Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Set other gender field on permit holders page #318

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

leogjhuang
Copy link
Collaborator

Notion ticket link

Cannot save edits to personal info section (name or gender) when processing new requests

Implementation description

  • otherGender is set to null when updating permit holder information for new applicants
  • Quick fix is to set otherGender to an empty string on save

Error

other-gender-null

Notes

  • Once schema can be updated to allow otherGender to be null, this quick fix can be removed.

Checklist

  • My PR name is descriptive, is in imperative tense and starts with one of the following: [Feature],[Improvement] or [Fix],
  • I have run the appropriate linter(s)
  • I have requested a review from the RCD team on GitHub, or specific people who are associated with this ticket

Copy link
Member

@sherryhli sherryhli left a comment

Choose a reason for hiding this comment

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

Approved, feel free to merge so we can get a fix out ASAP. However, I think the schema in this case refers to the validation schema rather than the DB schema so we should be able to implement the long-term fix now.

Problem is somewhere here:

otherGender: string().when('type', {
is: 'NEW',
then: string().nullable().default(null),
otherwise: string().optional(),
}),

@leogjhuang leogjhuang merged commit 85776f9 into staging Oct 3, 2023
1 check passed
@leogjhuang leogjhuang deleted the lh/other-gender-null branch October 3, 2023 02:34
@leogjhuang leogjhuang mentioned this pull request Oct 4, 2023
3 tasks
leogjhuang added a commit that referenced this pull request Oct 4, 2023
* [Fix] Save poaFormS3ObjectKey when updating guardian information in permit holders page (#319)
* [Fix] Postal Code Space Issue (#316)
* Set other gender field on permit holders page (#318)
* Add .nvmrc file (#317)
* [Feature] Implement applicant deletion (#310)
* [Feature] Implement application deletion (#315)
* Display other gender field on permit holders page (#314)
* Move wallet card task in application processing (#313)
* [Feature] Tax receipt (#311)
* [Fix] Fix expiry date for in-progress replacement applications (#274)
* [Fix] Fix APP history permit type badge (#273)
* [Improvement] Adjust spacing of address in invoice (#272)
* [Fix] Show validation error messages on form mount (#271)
@leogjhuang leogjhuang mentioned this pull request Oct 10, 2023
3 tasks
@leogjhuang leogjhuang mentioned this pull request Oct 10, 2023
3 tasks
leogjhuang added a commit that referenced this pull request Oct 10, 2023
* [Feature] Create setEmployeeAsActive GraphQL endpoint (#322)
* [Fix] Save poaFormS3ObjectKey when updating guardian information in permit holders page (#319)
* [Fix] Postal Code Space Issue (#316)
* Set other gender field on permit holders page (#318)
* Add .nvmrc file (#317)
* [Feature] Implement applicant deletion (#310)
* [Feature] Implement application deletion (#315)
* Display other gender field on permit holders page (#314)
* Move wallet card task in application processing (#313)
* [Feature] Tax receipt (#311)
* [Fix] Fix expiry date for in-progress replacement applications (#274)
* [Fix] Fix APP history permit type badge (#273)
* [Improvement] Adjust spacing of address in invoice (#272)
* [Fix] Show validation error messages on form mount (#271)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants