c467daf503fe7c8c434c5e1891afdad2614efcc2
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')`.
dashboard-ticketing
Description
Languages
PHP
100%