Repository navigation
fix: match attendee answers to attendee numbers, not arrival order - #16
Merged
Merged
Conversation
DetailsPage::save() renumbered each ticket's posted answers with array_values(), so they were matched to attendees in the order the fields arrived rather than by their [cart key][index] number. A browser posts in page order, so the attendee page itself was unaffected, but anything posting in another order put details on the wrong attendees; on staging63 a draft save that sent attendee 3 first put attendee 3's details on attendee 1. Answers are now read by attendee number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DetailsPage::save()renumbered each ticket's posted answers witharray_values(), so it matched them to attendees in the order the fields arrived, not by theirtsharp_attendee[cart key][index]number.A browser posts in page order, so the attendee page was unaffected. Anything posting in another order put details on the wrong attendees. Found on staging63 while checking v0.6.2: a draft save (curl) that sent attendee 3 first put attendee 3's details on attendee 1.
Fix. Answers are read by attendee number. A number that isn't posted gets empty answers, as a missing one did before.
Checks. Local gates (
ci-local tickets-sharp, PHP 8.4) pass: 314 tests, PHPStan, PHPCS. One new test posts answers out of order, with int and string keys, and with a gap.Merging releases a patch (0.6.3).