-
Notifications
You must be signed in to change notification settings - Fork 92
Feat: Add registration number field to advanced search configuration #10853
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
Open
Siyasanga
wants to merge
4
commits into
develop
Choose a base branch
from
ocrvs-10760
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+51
−50
Conversation
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
Contributor
|
Your environment is deployed to https://ocrvs-10760.e2e-k8s.opencrvs.dev |
13 tasks
b8b370f to
223f1cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| CHANGELOG.md | 5/5 | Added changelog entry documenting the new registration number field in advanced search configuration |
| packages/commons/src/events/AdvancedSearchConfig.ts | 5/5 | Added legalStatuses.REGISTERED.registrationNumber to both EventFieldIdInput and EventFieldId enums, enabling registration number searches |
| packages/client/src/v2-events/features/events/Search/utils.ts | 5/5 | Added default field generator configuration for registration number field with proper label and text input type |
3 files reviewed, no comments
2dc5bc6 to
03d1692
Compare
5 tasks
03d1692 to
f2f38f1
Compare
tumbledwyer
approved these changes
Dec 5, 2025
cd3cfa4 to
94e4ac0
Compare
…ditionals
The .extend(z.object({...}).shape) pattern was preventing proper field overrides.
Specifically, ReadActionConfig's conditionals: z.never() override wasn't working,
causing validation errors when READ actions inherited the array conditionals from ActionConfigBase.
This fixes Zod validation errors:
- 'expected never, received array' for READ action conditionals
- Proper discriminated union validation for all action types
The .extend() method in Zod merges fields rather than replacing them.
When ActionConfigBase has conditionals defined, extending with conditionals: z.never()
creates a conflict. Using .omit({conditionals: true}) first removes the field completely,
then .extend() adds only the fields we want without the conditionals field.
This ensures READ actions truly cannot have conditionals, fixing the validation error:
'expected never, received array' at path actions[0].conditionals
Use 'in' operator to properly narrow ActionConfig type before accessing conditionals property. Some action types (like READ) don't have conditionals, so we need a type guard to satisfy TypeScript's stricter checking.
8c632eb to
f134e09
Compare
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.
Addresses: #10760
Description
There's a requirement to allow countries(Somalia) to show the registration number on the summary screen. Since it's a metadata fields we need to add the registrationNumber config in the list of hardcoded options for summary screen.