TransactionManager::cancelTransaction() releases held lines, cancels confirmed lines, then unconditionally stamps the order as cancelled. On an order that has already settled (all bookings completed, or marked a no-show), there is nothing to cancel, but the order is still flipped to cancelled while its bookings stay completed. This is inconsistent with the booking level, where cancel() already refuses a non-confirmed booking.

Fix: cancelTransaction() refuses when the order is in a settled terminal state (completed or no-show) or is already cancelled, returning 0 without changing state. A re-check under the row lock keeps a concurrently settled order from being overwritten. Covered by a kernel test.

Issue fork yoyaku-3611922

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 committed 54d1ffba on 1.x
    fix: #3611922 Cancelling a completed order wrongly marks the order...
mably’s picture

Status: Active » 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.