Conversation
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
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-2893
Updating a client family member's relationship (
PUT /clients/{clientId}/familymembers/{familyMemberId}with a newrelationshipId) returned 200 but left the relationship unchanged.Root cause:
ClientFamilyMemberCommandFromApiJsonDeserializeronly supportsrelationshipId, and add-member and create-client-with-family-members read that key.ClientFamilyMembersWritePlatformServiceImpl.updateFamilyMemberread the misspelledrelationShipId, so the value was ignored. SendingrelationShipIdinstead is rejected as an unsupported parameter, so no payload could change the relationship.Fix:
updateFamilyMemberreadsrelationshipId.validateForCreate(long, String)andvalidateForUpdateuse the existingRELATIONSHIP_IDconstant.RELATION_SHIP_IDconstant is removed.Tests: new unit test
ClientFamilyMembersWritePlatformServiceImplTest.updateFamilyMemberAppliesRelationshipId. It fails on currentdevelopand passes with this change.spotlessJavaCheckpasses.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
relationshipIdparameter now works on update.Your assigned reviewer(s) will follow our guidelines for code reviews.