Skip to content

Rename courtRoomId to roomId in change-court-room-for-multiday-hearing command#34

Merged
ozturkmenb merged 2 commits into
team/ccsph2nfrom
dev/roomid-rename-multiday-change-courtroom
Jul 10, 2026
Merged

Rename courtRoomId to roomId in change-court-room-for-multiday-hearing command#34
ozturkmenb merged 2 commits into
team/ccsph2nfrom
dev/roomid-rename-multiday-change-courtroom

Conversation

@ozturkmenb

Copy link
Copy Markdown

What

Renames courtRoomIdroomId in the input command schema
http://justice.gov.uk/listing/courts/listing.command.change-court-room-for-multiday-hearing.json
(the nonDefaultDays[] items). The field remains a uuid.

Why

Aligns the change-court-room-for-multiday-hearing command's nonDefaultDays field name
with the roomId convention already used by other listing commands' nonDefaultDays
(e.g. update-hearing-for-listing).

Files changed (input contract only)

  • listing.command.change-court-room-for-multiday-hearing.json schema — field + required list
  • listing.command.change-court-room-for-multiday-hearing.json example
  • ListingCommandApi — new ROOM_ID constant; the single input-fallback read now reads roomId
    (the enriched write of courtRoomId is preserved)
  • ListingCommandApiTest + ChangeCourtRoomForMultidayHearingIT — input payloads

Deliberately NOT changed

  • Enriched command changedDays[].courtRoomId — internal downstream contract, not caller-facing
  • Aggregate / events / viewstore read model
  • cpp-context-listing-courtscheduler — its request carries only courtScheduleId (no room field),
    so the rename does not cross the context boundary

Verification

  • mvn clean install — BUILD SUCCESS
  • ./runIntegrationTests.sh — GREEN. Failsafe suite 256/0/0 (3 skipped); ChangeCourtRoomForMultidayHearingIT 8/8 passed. Deployed-schema validation confirmed roomId is accepted/required end-to-end (server.log shows only the intended negative-test violations, none on the field name).
  • Sonar quality gate: deferred to the CI PR analysis (listing uses a shared mainline SonarQube key, so a local scan would overwrite the mainline snapshot).

Follow-ups (separate repos, out of scope here)

This is a breaking change to the public command contract. Any caller that sends
courtRoomId for this command must switch to roomId:

  • cpp-apitests payload builders (change-court-room-for-multiday area)
  • cpp-ui-listing if it posts this command

…g command

Renames the nonDefaultDays[].courtRoomId field to roomId in the input command
schema listing.command.change-court-room-for-multiday-hearing (stays a uuid),
aligning it with the roomId naming used by other listing commands' nonDefaultDays.

Updates the example, the single input read in ListingCommandApi (new ROOM_ID
constant), and the command-api unit test and integration test payloads. The
enriched command (changedDays[].courtRoomId) is left unchanged as an internal
contract; courtscheduler is unaffected as its request is keyed on courtScheduleId.
@ozturkmenb ozturkmenb requested a review from a team as a code owner July 10, 2026 01:20
@cpp-github-management

Copy link
Copy Markdown

Passed

@cpp-github-management

Copy link
Copy Markdown

Passed

@ozturkmenb ozturkmenb merged commit 393c014 into team/ccsph2n Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant