A refused rate change on the place map is silently ignored
The bug
op: category can be refused. PlaceSelectionController::category() answers
409 {ok: FALSE, error: 'Not held.'} when the place is not held any more,
because the hold lapsed or the line was dropped in another tab. The select's
change handler tested r.ok and then fell through with no branch at all: no
revert, no retry, no message. The dropdown went on showing a rate the server had
rejected, and renderSummary() went on computing the total from it. Every
neighboring path (hold, release, clearAll, the pool steppers) handles its
own refusal.
What it does now
Changing the rate on a seat the server no longer holds takes the seat again at
that rate, through the toggle op, which already holds an unheld place at a
given tier. Moving the rate says the visitor still wants that seat at that
price, so acting on it is the useful reading of the gesture.
If the seat has been taken by somebody else in between, it cannot be had, so the
line is dropped: the seat flips to is-taken and the live region says it is no
longer available.
Reverting the control was the first version of this fix and it was wrong. It
left the panel showing a seat as mine that nobody held, and the rate could
then never be changed at all, since every further attempt met the same refusal.
The reconciling version was verified by hand on a 1,422-seat hall.
Tests
Two FunctionalJavascript tests in VenueMapPickerTest:
testRateChangeOnLapsedSeatTakesItAgainreleases the hold from PHP after the page is drawn, changes the rate, then asserts the announcement, theis-mineclass, the select sitting on the new tier, the new total, and that a hold really exists on the server rather than trusting what the panel says.testRateChangeOnTakenSeatDropsTheLineholds the seat as another user, changes the rate, and asserts the seat isis-takenand the picks list is back to its empty state.
Both were confirmed to fail against the unfixed handler.
Also in here
translations/yoyaku.fr.pogains the new string and loses the one for the message that no longer exists.eslint --fixcleared two pre-existingprefer-destructuringerrors in the same file, which is now error-free. They are unrelated to the fix and can be split out if that is preferred.