Repository navigation
FINERACT-2907: Return clientNonPersonDetails from GET /clients/{clientId} - #6603
Merged
IOhacker merged 1 commit intoOct 9, 2026
Merged
Conversation
…tId}
For a client with Legal Form = Entity, the legal entity details
(constitution, main business line, incorporation number, incorporation
validity date, remarks) are saved in m_client_non_person, but
GET /clients/{clientId} never returned them. Since FINERACT-1760
retrieveOne() builds the response with ClientMapper, which ignores
clientNonPersonDetails, so front ends that edit the client showed these
fields empty.
Load the ClientNonPerson for the client in retrieveOne() and set
clientNonPersonDetails on the response. Document the field in the
Swagger response and cover it with a unit test and an integration test.
Assisted-By: claude-opus-5-5
samchinmaya
force-pushed
the
FINERACT-2907-client-non-person-details
branch
from
October 8, 2026 20:22
80181b0 to
9ea8f8a
Compare
IOhacker
approved these changes
Oct 8, 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.
Description
JIRA: FINERACT-2907
For a client with Legal Form = Entity, the legal entity details (constitution, main business line, incorporation number, incorporation validity date, remarks) are saved in
m_client_non_person, butGET /clients/{clientId}never returns them:clientNonPersonDetailsis alwaysnull. Front ends that edit the client (e.g. the Mifos web app's Edit Client) therefore show these fields empty, even though they are set.Cause: since FINERACT-1760,
ClientReadPlatformServiceImpl.retrieveOne()builds the response withClientMapper.map(client), andClientMapperhas@Mapping(target = "clientNonPersonDetails", ignore = true), so the details are never filled in.Change:
retrieveOne()loads the client'sClientNonPersonthroughClientNonPersonRepositoryWrapper.findOneByClientId()and setsclientNonPersonDetails(constitution and main business line asCodeValueData). Clients without non-person details are unchanged.@GetteronClientNonPersonandClientNonPersonData, for the mapping and the tests.clientNonPersonDetailsadded to theGET /clients/{clientId}response model.ClientReadPlatformServiceImplTest(details are set when present, and staynullfor a person client); integration test inClientTestthat creates an entity client and checks the returned details.Verification:
ClientReadPlatformServiceImplTestpasses (6/6).spotlessJavaCheckandcheckstylepass.clientNonPersonDetails, for bothGET /clients/{id}andGET /clients/{id}?template=true. Ondevelop, the same request returnsclientNonPersonDetails: null, while the row exists inm_client_non_person.ClientTest.The legacy
apiLive.htmdoesn't document the non-person fields at all, so I left it unchanged; the Swagger annotation documents the field.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.