Booking — Combine booking rule
The combine booking rule decides whether, when you edit a booking, related bookings (placed in the same action) are loaded together for editing. It is a rule about edit & attendance scope, NOT about price (price is the discount rule).
Configuration: CombinedBookingOption
Enum CombinedBookingOption (Tux/src/Tux.Core/Enums/RegularCasualBookingOption.cs), stored on ProgramCategory.CombinedBookingOptionId:
| Option | Code | Load scope on edit |
|---|---|---|
Term_Program_Set | 0 | Same course only (default behaviour). |
ProgramCategory | 1 | Across courses within the same program category. |
ActionLogId — the grouping key
Bookings placed in the same action share an ActionLogId. The combine rule uses it to find "sibling" bookings:
CombinedBookingOptionId = 1: load every editable booking with the sameActionLogIdin the same program category, even across courses — without asking for confirmation.- Otherwise: keep the old behaviour — suggest only candidates with the same
ActionLogIdin the same course (ticket 9384), still asking via the related-attendee popup.
Example: TermCare has
CombinedBookingOptionId = 1; a Before School Care and an After School Care booking share anActionLogId→ editing one loads both.
Exclusion rules
The system does not load into combined edit when:
- The
ActionLogIddiffers. - The program category differs (even with the same
ActionLogId). - It is outside the customer account scope / authorized admin scope.
Candidate validation
Every id submitted in a combined edit is validated before creating/updating an edit order:
- Same non-null
ActionLogIdand same program category. - Inside user scope; active, editable, unlocked, no conflicting pending order.
- Any violation → the whole request is rejected; no partial edit order for the valid subset.
Effect when removed from the group
When reconfirming a combined booking causes one booking to be removed from the group:
- That booking →
Canceled. - Its active
TermAttendanceis deactivated in the same confirm operation. - Retained bookings stay active (unless the diff changes them separately).
Discovering combined existing bookings
When entering a create/edit flow where the current account/attendee already has same-ActionLogId bookings under a combined category, the Booking UI preselects the account and loads the combined group without requiring account selection (admin attendee-first search resolves the account first).
Related invariants
INV-BOOK-20— combined edit expands the category ActionLog group.INV-BOOK-19(v2) — non-combined keeps same-course behaviour; validates category ActionLog scope.
Source of truth:
openspec/specs/booking/spec.md(the "Combined booking edit…" requirements).
Next: Data & external links.