FINERACT-2408: Add entityStatus mapping for SAVING and SHARE entities in the search API #5470
+31
−6
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.
Description
Implements FINERACT-2408: This PR adds
entityStatusmapping for SAVING and SHARE entities in the search API.The
/v1/searchendpoint returned an emptyentityStatusfor entities of type SAVING and SHARE.This happened because
SearchMapper.mapRow()inSearchReadPlatformServiceImpldid not contain handling for these entity types, so the status defaulted to an emptyEnumOptionData.Solution
Added missing mappings in
SearchMapper.mapRow():For SAVING entity types:
SavingsAccountStatusEnumDatausingSavingsEnumerations.status().EnumOptionDatausing the status data's id, code, and value.For SHARE entity types:
ShareAccountStatusEnumDatausingSharesEnumerations.status().EnumOptionDatausing the status data's id, code, and value.To support this conversion, overloaded
status()methods are introduced inSavingsEnumerationsandSharesEnumerations.Result
Search results for SAVING and SHARE entities now return the correct
entityStatusinstead of empty values.Verification
Before Fix
After Fix
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.