Skip to content

Po 1963 replace defendant account party change api#1647

Merged
Alfred-Gillingham2 merged 5 commits intomasterfrom
PO-1963-Replace-Defendant-Account-Party-Change-API
Apr 9, 2026
Merged

Po 1963 replace defendant account party change api#1647
Alfred-Gillingham2 merged 5 commits intomasterfrom
PO-1963-Replace-Defendant-Account-Party-Change-API

Conversation

@Aneesah33
Copy link
Copy Markdown
Contributor

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")

[ ] Yes
[x] No

Comment thread src/main/java/uk/gov/hmcts/opal/repository/DefendantAccountPartiesRepository.java Outdated
@Aneesah33 Aneesah33 force-pushed the PO-1963-Replace-Defendant-Account-Party-Change-API branch from f20f3e3 to b04c568 Compare March 31, 2026 16:22
@jonathanDuffy jonathanDuffy force-pushed the PO-1963-Replace-Defendant-Account-Party-Change-API branch from b04c568 to d730810 Compare April 1, 2026 12:55
@jonathanDuffy jonathanDuffy force-pushed the PO-1963-Replace-Defendant-Account-Party-Change-API branch from d730810 to 710ba80 Compare April 1, 2026 14:20
@Aneesah33 Aneesah33 force-pushed the PO-1963-Replace-Defendant-Account-Party-Change-API branch from edad401 to e704b8a Compare April 1, 2026 17:23
@hmcts-jenkins-cnp
Copy link
Copy Markdown
Contributor

Plan Result (stg)

No changes. Your infrastructure matches the configuration.

@ShanCGI ShanCGI force-pushed the PO-1963-Replace-Defendant-Account-Party-Change-API branch from 53fa9c1 to 49d6b58 Compare April 9, 2026 15:15
Copy link
Copy Markdown
Contributor

@ShanCGI ShanCGI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates look good.

@Alfred-Gillingham2 Alfred-Gillingham2 enabled auto-merge (squash) April 9, 2026 15:20
@Alfred-Gillingham2 Alfred-Gillingham2 merged commit 2379fc0 into master Apr 9, 2026
8 checks passed
@Alfred-Gillingham2 Alfred-Gillingham2 deleted the PO-1963-Replace-Defendant-Account-Party-Change-API branch April 9, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants