-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix(citizenship): error with given and family names on prod #15865
Conversation
WalkthroughThe changes involve modifications to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- libs/application/template-api-modules/src/lib/modules/templates/directorate-of-immigration/citizenship/citizenship.service.ts (1 hunks)
- libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/PersonalSection/UserInformationSubSection.ts (1 hunks)
- libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts (1 hunks)
Additional context used
Path-based instructions (3)
libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/PersonalSection/UserInformationSubSection.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/directorate-of-immigration/citizenship/citizenship.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (3)
libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts (1)
123-123
: Verify the implications of extending the application's active duration.The change significantly increases the duration for which the application remains active before being pruned, from 1 day to 30 days. This could impact:
- Data retention
- Lifecycle management
- User experience
- System resources
Please confirm that the implications of this change have been carefully considered and validated, especially in terms of:
- Compliance with data retention policies
- Handling of stale or outdated applications
- User notifications and experience when returning to older applications
- Increased storage and processing requirements
Provide evidence that these aspects have been thoroughly tested and potential risks have been mitigated.
libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/PersonalSection/UserInformationSubSection.ts (1)
61-61
: LGTM!The change simplifies the logic by directly utilizing the
fullName
property instead of constructing the name from separate fields. This enhances consistency and reduces potential errors related to name formatting.The code adheres to the reusability and TypeScript usage guidelines.
libs/application/template-api-modules/src/lib/modules/templates/directorate-of-immigration/citizenship/citizenship.service.ts (1)
309-313
: Verify the assumption for derivinggivenName
andfamilyName
.The current logic assumes that the last segment of
fullName
is always the family name. However, this may not hold true for all naming conventions.Please ensure that this assumption is valid for the expected user base of the application.
Additionally, consider adding a null check before accessing
individual.fullName
to prevent potential errors:- individual?.fullName.split(' ').slice(0, -1).join(' ') + individual?.fullName?.split(' ').slice(0, -1).join(' ')- individual?.fullName.split(' ').pop() + individual?.fullName?.split(' ').pop()
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15865 +/- ##
==========================================
- Coverage 36.93% 36.93% -0.01%
==========================================
Files 6681 6681
Lines 136449 136450 +1
Branches 38745 38746 +1
==========================================
Hits 50399 50399
- Misses 86050 86051 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 4 Total Test Services: 0 Failed, 4 Passed Test Services
|
* fixed name error and prune date for draft * fixed name error and prune date for draft --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
...
Attach a link to issue if relevant
What
Family name and given name are sometimes null from Þjóðskrá and need to do a small fix to prevent that from breaking the submit function
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
givenName
andfamilyName
are populated even when certain fields are missing.fullName
property.These changes improve data accuracy and user experience within the citizenship application process.