Po 1963 replace defendant account party change api#1647
Merged
Alfred-Gillingham2 merged 5 commits intomasterfrom Apr 9, 2026
Merged
Po 1963 replace defendant account party change api#1647Alfred-Gillingham2 merged 5 commits intomasterfrom
Alfred-Gillingham2 merged 5 commits intomasterfrom
Conversation
f20f3e3 to
b04c568
Compare
b04c568 to
d730810
Compare
d730810 to
710ba80
Compare
edad401 to
e704b8a
Compare
Contributor
Plan Result (stg) |
Alfred-Gillingham2
approved these changes
Apr 7, 2026
…individual to organisation
53fa9c1 to
49d6b58
Compare
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.
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/PO-1963
Change description
PO-1963 updates PUT /defendant-accounts/{id}/defendant-account-parties/{id} for the individual -> organisation conversion path.
•When the existing defendant party is individual and request sets organisation_flag=true, parent/guardian defendant-account-party links are removed in the same transaction.
•Added/updated service and repository logic to support this behavior.
•Added/updated unit and integration tests for the conversion + parent/guardian removal scenario.
•Manual test evidence on local stack: PUT returned 200, and DB Parent/Guardian count for the test account changed from 1 to 0.
Note: please ignore commit d7fb24e as prep/refactor only. Functional PO-1963 behavior is in 1e86817 (individual->organisation conversion removes Parent/Guardian link in the same transaction).
Does this PR introduce a breaking change? (check one with "x")