Skip to content

FINERACT-2893: Apply relationshipId when updating a client family member - #6583

Open
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/FINERACT-2893-family-member-relationship-update
Open

rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/FINERACT-2893-family-member-relationship-update

Conversation

@rymghosn

@rymghosn rymghosn commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Description

JIRA: FINERACT-2893

Updating a client family member's relationship (PUT /clients/{clientId}/familymembers/{familyMemberId} with a new relationshipId) returned 200 but left the relationship unchanged.

Root cause: ClientFamilyMemberCommandFromApiJsonDeserializer only supports relationshipId, and add-member and create-client-with-family-members read that key. ClientFamilyMembersWritePlatformServiceImpl.updateFamilyMember read the misspelled relationShipId, so the value was ignored. Sending relationShipId instead is rejected as an unsupported parameter, so no payload could change the relationship.

Fix:

  • updateFamilyMember reads relationshipId.
  • validateForCreate(long, String) and validateForUpdate use the existing RELATIONSHIP_ID constant.
  • The misspelled RELATION_SHIP_ID constant is removed.

Tests: new unit test ClientFamilyMembersWritePlatformServiceImplTest.updateFamilyMemberAppliesRelationshipId. It fails on current develop and passes with this change. spotlessJavaCheck passes.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes. No API change: the documented relationshipId parameter now works on update.
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.
  • If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately.
  • I followed the AI Policy.

Your assigned reviewer(s) will follow our guidelines for code reviews.

updateFamilyMember read the misspelled parameter "relationShipId", while
the deserializer only supports "relationshipId" (the key add-member and
create-client-with-family-members use). An update carrying relationshipId
returned 200 but the relationship was silently left unchanged, and one
carrying relationShipId was rejected as an unsupported parameter.

Read relationshipId in the update, validate it through the existing
RELATIONSHIP_ID constant in both validators, and remove the misspelled
RELATION_SHIP_ID constant.

Assisted-By: claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant