-
Notifications
You must be signed in to change notification settings - Fork 3
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
Names lookup in Register that Notifications can use in keyword replacement #593
Labels
kind/user-story
Used for issues that describes functionality for our users.
Comments
SandGrainOne
added
kind/user-story
Used for issues that describes functionality for our users.
status/draft
Status: When you create an issue before you have enough info to properly describe the issue.
labels
Aug 16, 2024
olebhansen
added
the
status/pending-feedback
Awaiting clarification/input from stakeholders etc.
label
Aug 20, 2024
Checking with Register to get any inputs and/or a go-ahead to do the change and sent a PR. |
olebhansen
removed
the
status/pending-feedback
Awaiting clarification/input from stakeholders etc.
label
Aug 27, 2024
OK to submit PR. Check/validate approach with @Alxandr before starting. |
15 tasks
Input from refinement: v1 can be 1-by-1 lookups |
SandGrainOne
removed
the
status/draft
Status: When you create an issue before you have enough info to properly describe the issue.
label
Sep 10, 2024
5 tasks
Manual testing: Looks fine. Working as expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Notifications have a needs for the first, middle and last name of a person as separate properties. The values will be used in search and replace operations when notification texts contains keyword for those values. Register currently doesn't have a suitable endpoint that provide this, so we need to make changes to Register.
This issue will make changes to the register/api/v1/parties/nameslookup endpoint in Register with a new parameter and optionally include the name of a person as separate properties for first, middle and last name.
Additional Information
There was an analysis of existing endpoints in Register: #589. This concluded that we needed changes in Register and potentially in Altinn 2 (bridge). After a talk with the team responsible for Register we've found a solution isolated to Register.
Tasks
Altinn.Platform.Register.Models.PartyName
model with properties for FirstName, MiddleName and LastName. Decorate the properties with[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
Altinn.Register.Clients.PartiesClient.GetOrAddPartyNameToCacheAsync()
method to support a more complex entity instead of only a single string. It's a private method so we could consider using a record struct.Altinn.Register.Controllers.PartiesController.PostPartyNamesLookup()
method calledsplitpersonname
. The value should be used to optionally populate first, middle and last name during mapping to the PartyName model. (In a future version of Register the default behavior of the logic is to not retrieve the values from the database unless specifically asked for. This is future proofing.)LookupPartyBySSNOrOrgNo()
.Acceptance Criterias
register/api/v1/parties/nameslookup
endpoint returns the person name split across separate properties in addition to the original name property.Post-Implementation Changes
The
register/api/v1/parties/nameslookup
endpoint has been updated to accept a new query parameter:partyComponentOption
. Below are the use cases and expected outcomes for this parameter:?partyComponentOption=person-name
: Name components will be populated and returned.?partyComponentOption=none
: A "Bad Request" error will be returned.?partyComponentOption=anything-else
: A "Bad Request" error will be returned.The text was updated successfully, but these errors were encountered: