A confirmed booking has no terminal state that tells apart a stay that actually took place from one the customer never showed up for. Once the slot passes, the order and its lines stay "confirmed" forever, so reporting cannot distinguish a honored booking from a no-show.

Proposed resolution

Add two terminal states at both levels, the per-line booking and the order (booking transaction):

  • completed: a confirmed booking that was honored (the slot was used, attended).
  • unused: a confirmed booking the holder never used (a no-show).

Both are added to the consuming states (a used or no-show line still occupied its slot), unlike released, expired and cancelled which free the capacity. The transitions run from the confirmed state only: BookingManager gains complete() and markUnused() (each dispatching a booking event), TransactionManager gains completeTransaction() and markUnusedTransaction(), and OrderManager exposes completeOrder() and markUnusedOrder() with both a generic action (for the admin and Views Bulk Operations) and a workflow action.

Aggregation

The order state aggregates its line states, and dropped lines (released, expired, cancelled) no longer count against a positive state. So an order stays confirmed when the holder cancels some lines and the rest are confirmed, and it is completed when the remaining lines were honored even if some were cancelled. A held line keeps the whole order pending; an order is cancelled only when every line was dropped; a genuine mix of live states is partial.

Example workflow

The booking example workflow sets the order state from the attendance outcome: attended and damaged mark the order completed, a no-show marks it unused. Three action nodes sit between the attendance user task and the deposit steps.

Tests

OrderTest covers the new transitions, the completed and unused aggregation, and the dropped-line cases (a cancelled line keeps the order completed, a released line keeps it confirmed).

Issue fork yoyaku-3609459

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

MR !9 opened.

  • mably committed b05c51be on 1.x
    feat: #3609459 Add completed and unused states for honored and no-show...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.