Preskoči na sadržaj

E3-F2: Individual Seat Status Change

Epic: E3: Seat Inventory Management

Size: S (Small)

Problem / Outcome

Admin changes status of a single seat with validation.

Scope

In-Scope:

  • PUT /admin/seats/{id}/status endpoint
  • Transition validation against rules
  • Reason required for change
  • Audit log entry creation

Out-of-Scope:

  • Bulk operations (separate feature)

Acceptance Criteria

  • AC1: Given valid transition, when admin changes status, then seat updated and logged
  • AC2: Given a seat, when its details open, then only the changes its state allows are offered (allowed_changes): holds on an available seat, release or another hold on a held seat, Available on a sold seat with no valid ticket
  • AC3: Given a sold seat with a valid ticket, a reserved (in-cart) seat, a quota-allocated seat or any seat of a closed or cancelled match, when its details open, then no change is offered and a note says why

Data Model Impact

Seat table:
- status (ENUM)
- last_modified_by (UUID, FK)
- last_modified_at (TIMESTAMP)

SeatAudit table:
- id (UUID, PK)
- seat_id (UUID, FK)
- from_status (ENUM)
- to_status (ENUM)
- reason (VARCHAR)
- changed_by (UUID, FK)
- created_at (TIMESTAMP)

Permissions/Roles

  • Admin (Inventory Manager)

How to Verify

npm test -- --grep "seat status change"

Expected: Valid changes work, invalid blocked, audit recorded.

Dependencies

Implementation Tasks

See E3: Seat Inventory Tasks

Doc References


Last Updated: January 2026