Skip to content

32826 - Add authorizationReceived Validation for Corps (Excluding IA and VD)#4322

Merged
meawong merged 4 commits into
bcgov:mainfrom
meawong:32826-Add-Validation-for-authorizationReceived-Excluding-IA-and-VD
Apr 27, 2026
Merged

32826 - Add authorizationReceived Validation for Corps (Excluding IA and VD)#4322
meawong merged 4 commits into
bcgov:mainfrom
meawong:32826-Add-Validation-for-authorizationReceived-Excluding-IA-and-VD

Conversation

@meawong
Copy link
Copy Markdown
Collaborator

@meawong meawong commented Apr 24, 2026

Issue #: /bcgov/entity#32826

Description of changes:

  • Add authorizationReceived validation to common_validations in applicable filings for CORPS only (relevant filings list covered across these three tickets: Create UI, FIlings UI and Create UI )
  • Update/Add unit tests
  • Import registry schema version 2.18.67

Corp Example requiring authorizationReceived (COD):
image
image
image

Corp Example not requiring authorizationReceived (Registrars Notation):
image

COOP Example (never requires authorizationReceived):
image
image

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

@meawong meawong self-assigned this Apr 24, 2026
}

FILINGS_REQUIRING_AUTHORIZATION = {
CoreFiling.FilingTypes.AGMEXTENSION,
Copy link
Copy Markdown
Collaborator Author

@meawong meawong Apr 24, 2026

Choose a reason for hiding this comment

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

Will need to add IA and VD to this list once the certified-by work is complete for those filings. This PR can be merged independently of that remaining work.

@meawong meawong requested review from argush3, kialj876 and loneil April 24, 2026 18:50
CoreFiling.FilingTypes.CONSENTCONTINUATIONOUT,
CoreFiling.FilingTypes.CONTINUATIONIN,
CoreFiling.FilingTypes.CONTINUATIONOUT,
CoreFiling.FilingTypes.CORRECTION,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would this trigger the flag needed on the staff Correction filing?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this will trigger for both CLIENT and STAFF Corrections.

Comment thread legal-api/tests/unit/services/filings/validations/test_common_validations.py Outdated
@meawong meawong requested a review from Rajandeep98 April 24, 2026 21:40
Copy link
Copy Markdown
Collaborator

@kialj876 kialj876 left a comment

Choose a reason for hiding this comment

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

Nice work!

return msg # authorizationReceived is only required for corporations

if filing_type not in FILINGS_REQUIRING_AUTHORIZATION:
return msg # authorizationReceived is only required for non-staff filings
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Potentially should update this comment because corrections are in FILINGS_REQUIRING_AUTHORIZATION which is a staff filing?

(CoreFiling.FilingTypes.ANNUALREPORT, True),
(CoreFiling.FilingTypes.REGISTRARSORDER, False), # staff filing
(CoreFiling.FilingTypes.INCORPORATIONAPPLICATION, False), # not in FILINGS_REQUIRING_AUTHORIZATION
])
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is cool - I didn't know you could stack parametrize like this. I like how you split out the params here

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@meawong meawong merged commit 683be66 into bcgov:main Apr 27, 2026
6 of 7 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.

4 participants