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

19774 Fixed null officer email schema error #651

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#19774

Description of changes:

  • app version = 5.8.11
  • delete officer email if it's null

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

- delete officer email if it's null
*/
fixNullAddressType (orgPeople: OrgPersonIF[]): OrgPersonIF[] {
return orgPeople.map(p => {
if (p.deliveryAddress?.addressType === null) delete p.deliveryAddress.addressType
if (p.mailingAddress?.addressType === null) delete p.mailingAddress.addressType
if (p.officer?.email === null) delete p.officer.email
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Feb 8, 2024

Choose a reason for hiding this comment

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

Party schema shows this:

image

JSON schema reference shows this (so I don't have to delete email if it's an empty string):

image

@severinbeauvais
Copy link
Collaborator Author

severinbeauvais commented Feb 8, 2024

After this change, you can see that parties[0].officer and parties[3].officer have an email property but the other 2 don't. This passes schema validation.

image

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

bcregistry-sre commented Feb 8, 2024

Temporary Url for review: https://business-create-dev--pr-651-pp38jdpg.web.app

SB says, try this: https://business-create-dev--pr-651-pp38jdpg.web.app/amalg-short-review-confirm?id=TNVSuDNaw6&accountid=2288
(As BCREG0020, you can submit this, but don't pay for it, please! This will allow me to cancel the payment and get back to the draft.)

@severinbeauvais severinbeauvais merged commit 98b366c into bcgov:main Feb 8, 2024
5 checks passed
JazzarKarim pushed a commit to JazzarKarim/business-create-ui that referenced this pull request Feb 23, 2024
- delete officer email if it's null

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
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.

4 participants