Skip to content

Hotel inactive rooms readonly - #4605

Merged
bitbyt3r merged 3 commits into
mainfrom
hotel-inactive-rooms-readonly
Sep 30, 2026
Merged

bitbyt3r merged 3 commits into
mainfrom
hotel-inactive-rooms-readonly

Conversation

@CarensirA-MF

Copy link
Copy Markdown
Contributor

Problem

When a room expires or is cancelled, the RoomAssignment row stays on file with status EXPIRED or CANCELLED. The attendee rooms pages treated it as a live booking. The list showed an Edit button, and the room page offered Save dates, special requests, billing address, invites, and a red "Card due by" line with an Add a card button that then failed. Attendees likely read this as the room still being theirs, even with the expired status.
image

Only the card flow refused these rooms. Dates, rewards number, special requests, billing address, invites and occupant changes all wrote to the dead row. No inventory was double-booked, because capacity counts only ASSIGNED and SECURED rows, but the page misled people and would likely result in support tickets from attendees

Change

Everything keys off RoomAssignment.is_live, not a list of statuses, so a future non-live status is covered without edits here.

  • room_action refuses non-live rooms after the ownership check. leave_room opts out with allow_inactive=True so an occupant can take themselves off a released room.
  • edit_room and copy_occupants check is_live directly. _resolve_assignment applies its statuses filter only on its fallback path; an explicit assignment_id skips it, so edit_room never filtered.
  • redeem_code and invite treat an invite to a non-live room as expired.
  • The rooms list moves non-live rooms, booked or occupied, to an "Inactive rooms" section with a one-line reason and a View button. A live connector under an expired suite now gets its own card in the live list instead of nesting under the dead suite.
image
  • The room page shows a notice with the same reason and hides every form and the card section. Leave room stays for occupants.
image
  • The lottery status page's "You have N room assignments" card counts live rooms only. It counted expired and cancelled rows, so an attendee whose only room expired was still offered rooms to manage.
image

The devtools lottery seeder gains a curated scenario keyed on inactive.rooms@example.com. That attendee holds a secured room, an expired room with a past deadline, a guest and a pending invite (code DEV-EXPIRED-ROOM), a cancelled room, and a secured suite with a cancelled connector. only.expired@example.com holds only an expired room, with the first attendee as its guest. expired.guest@example.com is the guest in the first expired room.

@bitbyt3r
bitbyt3r merged commit e875ed5 into main Sep 30, 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.

2 participants