Skip to content

fix: match attendee answers to attendee numbers, not arrival order - #16

Merged
crazeydave merged 1 commit into
mainfrom
fix/attendee-answers-by-number
Nov 19, 2026
Merged

crazeydave merged 1 commit into
mainfrom
fix/attendee-answers-by-number

Conversation

@crazeydave

Copy link
Copy Markdown
Contributor

DetailsPage::save() renumbered each ticket's posted answers with array_values(), so it matched them to attendees in the order the fields arrived, not by their tsharp_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).

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.
@crazeydave
crazeydave merged commit 416bcfd into main Nov 19, 2026
5 checks passed
@crazeydave
crazeydave deleted the fix/attendee-answers-by-number branch November 19, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant