Skip to content

PO-3667 handle nullable collection order date on defendant account update#1682

Merged
jonathanDuffy merged 3 commits intomasterfrom
PO-3667-Handle-nullable-collection_order_date-for-UpdateDefendantAccount-Opal-Legacy-
Apr 8, 2026
Merged

PO-3667 handle nullable collection order date on defendant account update#1682
jonathanDuffy merged 3 commits intomasterfrom
PO-3667-Handle-nullable-collection_order_date-for-UpdateDefendantAccount-Opal-Legacy-

Conversation

@Aneesah33
Copy link
Copy Markdown
Contributor

@Aneesah33 Aneesah33 commented Apr 2, 2026

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/PO-3667

Change description

•Update updateDefendantAccount collection order handling in Opal mode so collection_order_date defaults to today when collection_order_flag is true and the date is missing.
•Update Legacy-mode request mapping so the same collection order rules are applied before sending the gateway request.
•Clear collection_order_date whenever collection_order_flag is false, regardless of any supplied date.
•Relax the PATCH request contract so collection_order_date is no longer required for collection order updates.
•Add unit and integration coverage for the new collection order behaviour.
•Manually verified:
◦collection_order_flag=true with no date returns 200 and populates today’s date.
◦collection_order_flag=false with a supplied date returns 200 and clears the date to null.

•Align enforcement_court PATCH request contract with existing court ID usage by changing court_id to int64, so large court IDs no longer fail during request parsing.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

@Arnabsubedi233
Copy link
Copy Markdown
Contributor

Arnabsubedi233 commented Apr 7, 2026

Approved from frontend perspective. Everything looks good for courts and collection order Requests

@jonathanDuffy jonathanDuffy force-pushed the PO-3667-Handle-nullable-collection_order_date-for-UpdateDefendantAccount-Opal-Legacy- branch from bbe5363 to 14fc689 Compare April 8, 2026 13:57
@jonathanDuffy jonathanDuffy enabled auto-merge (squash) April 8, 2026 14:05
@jonathanDuffy jonathanDuffy force-pushed the PO-3667-Handle-nullable-collection_order_date-for-UpdateDefendantAccount-Opal-Legacy- branch from 14fc689 to 6b26b21 Compare April 8, 2026 14:09
@jonathanDuffy jonathanDuffy merged commit 9b3adaf into master Apr 8, 2026
8 checks passed
@jonathanDuffy jonathanDuffy deleted the PO-3667-Handle-nullable-collection_order_date-for-UpdateDefendantAccount-Opal-Legacy- branch April 8, 2026 14:21
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.

4 participants