The shared order summary (TransactionSummary::build) filters lines to CONSUMING_STATES (held, confirmed, completed, unused). For a fully cancelled order every line is in the cancelled state, so the summary renders empty and the cancellation notification lists nothing about what was cancelled. The confirmation email is unaffected.
The summary should match the order state: show the lines consistent with where the order is, instead of a fixed consuming-states lens.
- Confirmed or active order: consuming lines (held, confirmed, completed, unused).
- Cancelled order: cancelled lines.
- Released or expired order: released or expired lines.
Proposed in two steps. Step 1, surgical: derive the line states from the order state in the email path only (OrderNotifier and the [yoyaku-order:bookings] token), leaving TransactionSummary::build() default untouched so the order pages and cart are not affected. Step 2, optional: promote the state matching into TransactionSummary::build() itself so every surface matches, coordinating with the active-lines change that set the consuming-states default.
Follow-up to #3612196. The crash on the empty summary is already guarded there (OrderTokens::bookings returns empty markup rather than letting Markup::create() hand back a bare string for an empty input); this issue is only about showing the right content.
Issue fork yoyaku-3612364
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
Comment #3
mably commentedComment #6
mably commented