central-worker-1 c467daf503 The participants picker is sorted by the name it shows (#1598)
QA, reading the dropdown back after the picker became chips: typing `an`
listed "Toews, Fast, Ivanov, Mwangi, Bergman, Anderson" — to an operator,
no order at all.

It was in fact perfectly ordered. `searchUsers()` came out of the chip
conversion with `->orderBy('name')`, and `users.name` is the cached
"First Last" ("Abigail Toews", "Andrew Fast", "Avery Ivanov") — the one
string a chip row no longer prints. A list labelled "Last, First" and
collated by "First Last" reads as unsorted, which is #524's own reported
defect; the sibling conversion on [central-staff-employment] #1597 names
it as the thing it had to fix at the same moment.

So the collation moves with the label: `PersonNames::orderUsers()`, the
platform's single answer, which the reference search
(`admin.settings.users.search`) and the other chipped pickers already
use, and which honours the operator's `name_format` rather than assuming
surname-first.

Not cosmetic: the sort runs before `limit(10)`, so on a common surname
the two collations offer a different set of people, not the same set
shuffled.

Three tests in the shell suite (TicketParticipantsAreChipsTest) —
the collation, the `name_format` setting, and which ten survive the
limit. The first and third are red against `orderBy('name')`.
2026-09-11 13:31:09 -07:00
2026-04-08 14:12:03 -07:00
Description
Ticketing snap-in for dashboard-shell
Readme 756 KiB
Languages
PHP 100%