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

18299 fix xpro A -> XCR mapping #736

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Oct 24, 2023

Issue #: bcgov/entity#18299

NOTE: this PR is being merged into release-5.2.14 branch so that I can deploy it to Test and Prod with no other commits in it since the last Prod version.

Description of changes:

  • app version = 5.2.14.a
  • fixed Xpro REH and CHG mapping: XUL should be XCR
  • fixed entity type to corp type mapping:
    • removed entity type A,
    • XCR should map to EXTRA_PRO_A and
    • XUL should map to XPRO_UNLIMITED_LIABILITY_COMPANY
  • fixed corp type to entity type mapping:
    • EXTRA_PRO_A should map to XCR and
    • XPRO_UNLIMITED_LIABILITY_COMPANY should map to XUL

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

@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.2.14",
"version": "5.2.14a",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because this is a hotfix and there is already a 5.2.15.

@@ -76,16 +76,16 @@ export const XproMapping: RequestActionMappingI = {
REH: [
EntityTypes.RLC, // maps to Corp Type "LLC"
EntityTypes.XCP, // maps to Corp Type "XCP"
EntityTypes.XSO, // maps to Corp Type "XS"
EntityTypes.XUL // maps to Corp Type "A"
EntityTypes.XCR, // maps to Corp Type "EXTRA_PRO_A"
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Oct 24, 2023

Choose a reason for hiding this comment

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

  1. XCR === A
  2. I sorted this list.
  3. I removed XUL from below as per original NR code (before WoN changes).

@@ -59,7 +59,6 @@ export class CommonMixin extends Vue {
*/
entityTypeToCorpType (entityType: EntityTypes): CorpTypeCd {
switch (entityType) {
case EntityTypes.A: return CorpTypeCd.EXTRA_PRO_A // same as XUL
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Oct 24, 2023

Choose a reason for hiding this comment

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

I believe this is not a valid Namerequest entity type.

@@ -77,13 +76,13 @@ export class CommonMixin extends Vue {
case EntityTypes.SO: return CorpTypeCd.SOCIETY
case EntityTypes.UL: return CorpTypeCd.BC_ULC_COMPANY
case EntityTypes.XCP: return CorpTypeCd.XPRO_COOP
case EntityTypes.XCR: return CorpTypeCd.XPRO_CORPORATION
case EntityTypes.XCR: return CorpTypeCd.EXTRA_PRO_A
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

XCR === A

Copy link
Collaborator

@JazzarKarim JazzarKarim Oct 24, 2023

Choose a reason for hiding this comment

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

Ah man. Again, these can be soo confusing. On paper it sounds like EXTRA_PRO_A is EntityTypes.A, but apparently that's not the case. Just like how BC is a benefit company but CR is a limited company.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

😠

case EntityTypes.XL: return CorpTypeCd.XPRO_LL_PARTNR // same as XLL
case EntityTypes.XLL: return CorpTypeCd.XPRO_LL_PARTNR
case EntityTypes.XLP: return CorpTypeCd.XPRO_LIM_PARTNR
case EntityTypes.XP: return CorpTypeCd.XPRO_LIM_PARTNR // same as XLP
case EntityTypes.XSO: return CorpTypeCd.XPRO_SOCIETY
case EntityTypes.XUL: return CorpTypeCd.EXTRA_PRO_A
case EntityTypes.XUL: return CorpTypeCd.XPRO_UNLIMITED_LIABILITY_COMPANY
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this is the correct mapping, although I think we don't actually use XUL in Namerequest.

Copy link
Collaborator Author

@severinbeauvais severinbeauvais Oct 24, 2023

Choose a reason for hiding this comment

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

To be precise, Namex API seems to support XUL <-> A mappings, ie

image

However, the XUL <-> XUL mapping entries in Legal API are currently commented out, meaning they're not supported in Lear atm, ie

image

Interestingly, the XCR <-> XCR mapping entries in Lear are also commented out. This makes sense, since users need to go to COLIN to use XCR name requests... We will likely revisit this when we move over the final types from COLIN to LEAR. Good luck to us!

Copy link
Collaborator

Choose a reason for hiding this comment

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

A problem to keep in mind for the future haha 😅

@@ -99,7 +98,7 @@ export class CommonMixin extends Vue {
case CorpTypeCd.BC_COMPANY: return EntityTypes.CR
case CorpTypeCd.BC_ULC_COMPANY: return EntityTypes.UL
case CorpTypeCd.COOP: return EntityTypes.CP
case CorpTypeCd.EXTRA_PRO_A: return EntityTypes.XUL
case CorpTypeCd.EXTRA_PRO_A: return EntityTypes.XCR
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A === XCR

- fixed entity type to corp type mapping: removed entity type A, XCR should map to EXTRA_PRO_A and XUL should map to XPRO_UNLIMITED_LIABILITY_COMPANY
- fixed corp type to entity type mapping: EXTRA_PRO_A should map to XCR and XPRO_UNLIMITED_LIABILITY_COMPANY should map to XUL
EntityTypes.XLL,
EntityTypes.XLP,
EntityTypes.XSO,
EntityTypes.XUL
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Oct 24, 2023

Choose a reason for hiding this comment

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

I simply sorted this list.

I left XUL in there even though I I think we don't actually use it in Namerequest.

@severinbeauvais severinbeauvais marked this pull request as ready for review October 24, 2023 17:37
@severinbeauvais
Copy link
Collaborator Author

severinbeauvais commented Oct 24, 2023

To test this...

  1. I created the following name change NR for an A company:

image

  1. I created the following restoration NR for an A company:

image

Copy link
Collaborator

@JazzarKarim JazzarKarim left a comment

Choose a reason for hiding this comment

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

LGTM Sev!

@severinbeauvais severinbeauvais changed the title 18299 fix xpro A company mapping 18299 fix xpro A -> XCR mapping Oct 24, 2023
@severinbeauvais severinbeauvais merged commit 16623ba into bcgov:release-5.2.14 Oct 24, 2023
4 checks passed
Copy link
Collaborator

@ozamani9gh ozamani9gh left a comment

Choose a reason for hiding this comment

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

thanks sev looks good

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