Merged
Conversation
Signed-off-by: Lucas <lucasoneil@gmail.com>
38037ff to
9c64bd5
Compare
Signed-off-by: Lucas <lucasoneil@gmail.com>
d4a5104 to
e5055ee
Compare
Signed-off-by: Lucas <lucasoneil@gmail.com>
Signed-off-by: Lucas <lucasoneil@gmail.com>
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds backend enforcement for share class currency validation (ISO 4217) and supports round-tripping legacy OTHER currency share classes migrated from COLIN by exposing currencyAdditional and grandfathering existing OTHER records in certain filing contexts.
Changes:
- Add
currencyAdditionaltoShareClass.jsonfor API consumers (UI) to display legacy OTHER currency text. - Introduce
validate_share_currencyand wire it into multiple filing validation flows (IA, Continuation In, Amalgamation Application, Alteration, Correction, Transition). - Add unit tests covering ISO validation, OTHER grandfathering rules, and series-blocking under OTHER.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| legal-api/src/legal_api/services/filings/validations/common_validations.py | Adds validate_share_currency plus helper functions for ISO validation and legacy OTHER grandfathering. |
| legal-api/src/legal_api/services/filings/validations/incorporation_application.py | Invokes share currency validation for corps during IA validation. |
| legal-api/src/legal_api/services/filings/validations/continuation_in.py | Invokes share currency validation for continuation-in filings. |
| legal-api/src/legal_api/services/filings/validations/amalgamation_application.py | Invokes share currency validation for regular amalgamations. |
| legal-api/src/legal_api/services/filings/validations/alteration.py | Invokes share currency validation in alteration share structure validation flow (with business context). |
| legal-api/src/legal_api/services/filings/validations/correction.py | Invokes share currency validation for corp corrections (with business context). |
| legal-api/src/legal_api/services/filings/validations/transition.py | Invokes share currency validation for transition filings (with business context). |
| legal-api/src/legal_api/models/share_class.py | Extends ShareClass.json to include currencyAdditional. |
| legal-api/tests/unit/services/filings/validations/test_common_validations.py | Adds direct unit tests for validate_share_currency (ISO, OTHER behavior, series rules). |
| legal-api/tests/unit/services/filings/validations/test_incorporation_application.py | Adds a test asserting IA runs share currency validation through the full validate() path. |
| legal-api/tests/unit/models/test_share_class.py | Updates/extends model json tests for currencyAdditional. |
| legal-api/tests/unit/models/test_share_series.py | Updates expected share class json payload in series-related model tests to include currencyAdditional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
meawong
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue #: /bcgov/entity#32211
Description of changes:
Adds support for the legacy OTHER currency type on share classes migrated from COLIN and validates that currency values match recognized currency codes.
Model
currencyAdditionalin ShareClass.json so UIs can display the OTHER currency textValidation (
validate_share_currency)-Validate that share class currency is a recognized currency code (matching the standard currency list used by the UI dropdowns), only when
hasParValueis true-Grandfathered OTHER share classes pass through when the incoming share class ID matches an existing OTHER record in the DB — this handles the round-trip scenario where an alteration payload includes unchanged OTHER classes alongside modified non-OTHER classes
-New series under grandfathered OTHER share classes are blocked
Filing coverage
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).