33157: Fix share series name validation#4321
Merged
Merged
Conversation
Signed-off-by: Lucas <lucasoneil@gmail.com>
a145d3d to
e29cdde
Compare
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates share series naming validation to align backend rules with UI/requirements for share name uniqueness scoping (issue #33157).
Changes:
- Scope share series name uniqueness to within a single share class (allow repeats across classes and allow matching a class name).
- Update share class/series duplicate-name validation error messages to reflect the new rules.
- Adjust and extend unit tests to cover the revised validation behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| legal-api/src/legal_api/services/filings/validations/common_validations.py | Changes series-name duplicate detection to be per-class and updates related error messages/call signature. |
| legal-api/tests/unit/services/filings/validations/test_common_validations.py | Updates direct validate_series tests for new signature and adds tests confirming allowed name reuse across scopes. |
| legal-api/tests/unit/services/filings/validations/test_incorporation_application.py | Updates expected duplicate-name error messages for incorporation application validations. |
| legal-api/tests/unit/services/filings/validations/test_continuation_in.py | Updates expected duplicate-name error messages for continuation-in validations. |
| legal-api/tests/unit/services/filings/validations/test_amalgamation_application.py | Updates expected duplicate-name error messages for amalgamation application validations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
Sonar failure is on unit test message strings duplicated. I'd leave it as it's consistent with all existing test patterns. |
meawong
approved these changes
Apr 24, 2026
argush3
approved these changes
Apr 27, 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#33157
Description of changes:
Fix the validation for share series naming to match the UI and requirements (see ticket)
Adjust unit tests
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).