Repository navigation
SPRDT-1631-FIX-BUGS
Pre-release
Pre-release
SPRDT-1361 Fix single-day moves silently no-oping when nothing found Production bug (paired with the cpp-context-listing fix): now that courtRoomId/startTime/endTime are mandatory on every move-hearing-to-past-date request (main-contract alignment), endDate is ALWAYS present - even for an ordinary single-day move. But request.hasEndDate() was the signal moveHearingToPastDate used to decide "genuine multi-day-range search" (no match => exploratory 200 with empty sessions[], prior allocation left intact) vs "single-date request" (no match => hard 404/422 NoSessionAvailableException). Always-true hasEndDate() meant EVERY no-match case - including the common single-day one - silently returned 200 with an empty sessions array instead of erroring, which broke listing-side enrichment downstream (a "2 schema violations" failure on listing.command.move-hearing-to-past-date-enriched, since a single fabricated all-null session was built from the empty response). Fixed by keying the exploratory-vs-error branch on whether endDate is GENUINELY after startDate (a real range), not merely present. A same-day request (the shape every ordinary move now takes) still hard- fails when nothing is found; a genuine multi-day range still succeeds empty when nothing matches, preserving existing behaviour there. Added regression tests for both branches. Full unit suite re-verified green under JDK 25 (listingcourtscheduler-api, -viewstore-persistence, -domain: 1052 tests, 0 failures, 0 errors). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>