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

23382 and 24193: updated codes #1612

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Conversation

severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#23382 and bcgov/entity#24193

Description of changes:
- renamed enums for consistency with LEAR
- regrouped mapping items for consistency
- moved some codes together
- added BECC (x2)
- added CNV codes for continued in businesses
- added comments
- moved some codes together
- spelled out "BC Limited Company" and others
- added BECC and other missing CNV codes
- added whitespace and comments

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

Severin Beauvais added 3 commits November 18, 2024 16:11
- regrouped mapping items for consistency
- added BECC (x2)
- added CNV codes for continued in businesses
- added comments
- spelled out "BC Limited Company" and others
- added BECC and other missing CNV codes
- added whitespace and comments
Copy link

sonarqubecloud bot commented Nov 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
13 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link
Collaborator

@EPortman EPortman left a comment

Choose a reason for hiding this comment

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

LGTM

CONTINUE_IN = 'C' # Continued In BC Limited Company
BEN_CONTINUE_IN = 'CBEN' # Continued In BC Benefit Company
CCC_CONTINUE_IN = 'CCC' # Continued In BC Community Contribution Company
ULC_CONTINUE_IN = 'CUL' # Continued In BC 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 renamed these to be consistent with the enum used by the Entity UIs (and Namerequest UI).

Basically, instead of yet another standalone enum, these now match this:
https://github.com/bcgov/bcrs-shared-components/blob/main/src/modules/corp-type-module/corp-type-module.ts

('BECR', EntityTypes.CORPORATION.value, RequestAction.RESUBMIT.value),
('ULCB', EntityTypes.CORPORATION.value, RequestAction.CNV.value, True), # Unlimited Liability Company -> BC Limited Company
('ULCB', EntityTypes.CORPORATION.value, RequestAction.RESUBMIT.value),

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 moved all CORPORATION items together, and same for others below.

('BECV', EntityTypes.BEN_CONTINUE_IN.value, RequestAction.CNV.value, True), # continued in BC Limited Company -> continued in Benefit Company
('BECV', EntityTypes.BEN_CONTINUE_IN.value, RequestAction.RESUBMIT.value),
('ULBE', EntityTypes.BEN_CONTINUE_IN.value, RequestAction.CNV.value, True), # continued in Unlimited Liability Company -> continued in Benefit Company
('ULBE', EntityTypes.BEN_CONTINUE_IN.value, RequestAction.RESUBMIT.value),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is now the complete list of all applicable NR types for all business types.

You can compare this with:
https://github.com/bcgov/bcrs-shared-components/blob/main/src/enums/name-request-codes.ts

('RCR', 'BC', 'BC Limited Company', 'Restoration', 'static', None, 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/businesses-incorporated-companies/forms-corporate-registry#information-packages', None),
('BECR', 'BC', 'BC Limited Company', 'Conversion from Benefit Company ', 'lear', 'alteration', None, "{'filing': {'header': {'name': {entitiesFilingName} }, '{entitiesFilingName}': {'nameRequest': {'nrNumber': '{nrNumber}', 'legalName': '{legalName}', 'legalType': '{legalType}'}}}}"),
('ULCB', 'BC', 'BC Limited Company', 'Conversion from ULC', 'lear', 'alteration', None, "{'filing': {'header': {'name': {entitiesFilingName} }, '{entitiesFilingName}': {'nameRequest': {'nrNumber': '{nrNumber}', 'legalName': '{legalName}', 'legalType': '{legalType}'}}}}"),

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 moved all "BC" items together, and same for others below.

('RCC', 'CCC', 'Continued In CCC', 'Restoration', 'static', None, 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/businesses-incorporated-companies/forms-corporate-registry#information-packages', None),
('RUL', 'CUL', 'Continued In ULC', 'Restoration', 'static', None, 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/businesses-incorporated-companies/forms-corporate-registry#information-packages', None),
('BERE', 'CBEN', 'Continued in Benefit Company', 'Restoration', 'lear', None, None, None),

Copy link
Collaborator Author

@severinbeauvais severinbeauvais Nov 20, 2024

Choose a reason for hiding this comment

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

This lookup table (which is used by an endpoint only, I believe), now contains all possible [NR type, entity type] tuples, similarly to the other table and to this:
https://github.com/bcgov/bcrs-shared-components/blob/main/src/enums/name-request-codes.ts

@severinbeauvais
Copy link
Collaborator Author

severinbeauvais commented Nov 20, 2024

  1. I went into SonarCloud and "accepted" the "duplicate string, use a constant" warnings. I think that's fair because it's a lookup table and we don't want to overcomplicate it. This can always be changed later if absolutely needed.
  2. The linting errors were there before - see errors in previous PR.
  3. The testing errors were there before - see errors in previous PR.

Other notes:

  • The table in __init__.py is a dependency for Namerequest UI changes and will be tested via the UI.
  • Does anyone know what the table in name_request_filing_actions.py is used for? I think it's an endpoint, but I don't know who uses it nor how to test it. This is related to 24199.

@severinbeauvais
Copy link
Collaborator Author

@eve-git @stevenc987 , could you please review this PR and merge it if acceptable? Thanks!

Copy link
Collaborator

@eve-git eve-git left a comment

Choose a reason for hiding this comment

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

LGTM

@severinbeauvais severinbeauvais merged commit 3ad2532 into bcgov:main Nov 21, 2024
3 of 5 checks passed
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.

3 participants