Page MenuHomePhabricator

Allow sorting users by name
Closed, WontfixPublic


The users listed in /people are sorted in descending order by creation date. If you happen to be bad in remembering names, that doesn't really help in finding users.

The more natural "order by name" is missing in the UI. I think there are at least two good ways to implement this, one would be to create a selector similar to that one present in workboards which, if selected, would always present the users in this specific order. The other option would be to improve the advanced search in the People app to accomodate for this and then we could just save the query.

Event Timeline

g-p-g raised the priority of this task from to Needs Triage.
g-p-g updated the task description. (Show Details)
g-p-g added a project: People.
g-p-g added a subscriber: g-p-g.

How is this helpful in finding users if you don't remember names?

(When I don't remember a name, I usually go find some object that I remember interacting with them on.)

I really think the question is a different one, how could the current behavior be useful or consistent with other areas? For instance, you don't get to sort projects but they are ordered alphabetically. Have you used an address book sorted by creation date, and how helpful was that?

Most objects in Phabricator sort chronologically. The chronological ordering is helpful if you're creating accounts, because you can review or access those accounts the accounts you recently created easily. In the approval queue, it's helpful to show users in the order they entered the queue.

An address book is all people you know. The user directory isn't necessarily. Random access to users is most easily accomplished with global search anyway.

epriestley, the use cases you're mentioning are already covered by the search features available for the People app (joined after, joined before); the one I'm mentioning is not. There's also a page only for the Approval Queue, which doesn't need to be modified.

Also, this is not random access, it's "alphabetical" access.

epriestley claimed this task.

I don't understand this use case and haven't seen other requests for this.

The current sorting option doesn't make any sense when dealing with people, that's the motivation behind this.

MZMcBride added a subscriber: MZMcBride.

I'm politely requesting a reconsideration of this ticket as I filed a similar task at and was pointed here.

A lack of sort by user name functionality defies user expectations, in my opinion. A list of users is probably most commonly sorted alphabetically in ascending order (A to Z). This type of basic index of names exists all over our lives (an address book was mentioned), so the lack of user name sorting in a people search query is startling and unexpected.

Maniphest's advanced search (e.g., offers an "order by" option, so I'm not sure it's necessary to re-establish the merits of the ability to specify a sort order with a search query. This seems like a fairly common pattern across the virtual and meatspace worlds. :-)

Is there any reason not to add this functionality as part of advanced people search?

Beyond being unexpected, is this actually useful?

The reason not to add this functionality is that adding it is it's more complex (to build, maintain, and use) than not adding it, and it's not clear to me that makes any reasonable use case easier or better, and especially not easier or better enough to justify the cost.

Beyond simple ordering, if the motivation here is "it should be like an address book", address books are not normally sorted from A to Z on the entire string -- I think the most common ordering is by family name. This varies between cultures (first name vs last name) and is more complex here, particularly on the WMF install, because many users may not provide normal human name data as "Real Name".

It's useful for me to have sorting as it's easier to go through the list and find people. It seems obvious to me that A to Z ordering by username excluding disabled users should be the default query (exactly like is done in Projects which excludes archived ones in the default query), and then you could allow sorting my creation date and others.

If you want to find people by username, start typing the username into the global search. You can also type any part of their real name, or a combination of letters from the username and real name (like "eprie priestley"). The typeahead is dramatically better for finding people than an ordered list.

Except in those cases where you are not sure about the exact name (which I would say is the reasoning behind even starting T6092), if I enter "pg" it doesn't show "g-p-g", if I enter "gp" it shows someone else with username "gpg".

If you only know the name starts with "g", there are nine pages of results on this install. There will be many more on the WMF install. In all reasonable cases it is faster to go get more information about the user you're trying to look up so you can narrow your search instead of scanning through 900+ results manually.

If you have only a small number of users (less than ~200ish), the typeahead should hit your username on just "g". (It happens to even on this install in this specific case, even.)

If the search was better I would agree with that; at this point I don't see what's the purpose for the People page. If I want to find people that need to be verified, there's a query for that, but if I actually want to find people then it's not possible.

I agree that if I know exactly the user I want to find, then this is not needed. That's not what this is about. Even in your example that gives 9 pages, that's already much better than going through all the pages due to the current ordering.

Even if we assume that you frequently need to look up users whose names you roughly remember how to pronounce but do not know how to spell (which I don't believe anyone does regularly), the proposed solution is a bad solution to the problem. It doesn't help if you remember their real name, or only part of their full name, or know the initial sound but not the initial spelling (e.g., "chris" vs "kris"). The best way to find users who you only know a tiny amount of information about is still search, and always will be. This is dramatically more true on large installs.

If this is really a problem, some better solutions would be building a phonetic index using an algorithm like soundex, and/or something like a digraph index, or a phonetic+digraph index. These would let search find better results more often. But I don't think the problem as described -- roughly, knowing only the first letter of a user's username and no other information -- is a common one. At a minimum, no other user has ever reported encountering this problem, and I've never personally encountered it.

The single letter example was... an example.

See, this is not a problem that prevents using the system or that puts your house on fire. This is about presenting a more natural ordering for the People page, which is already done at least in the Project page. I still think the reverse question applies here, but you might choose to ignore it as we can't force you to answer it, why do you think that (for all purposes) random ordering for People is better than this proposed sorting?

I think it's better because it's already built, it's simpler from a code perspective, it's consistent with most other applications (which sort from newest objects to oldest objects), and it does serve some use cases like checking how many users have signed up recently (which are rare, but probably more common than the browse-for-usernames use case).

If software features were free to build and maintain, this would maybe be worth implementing. But software is expensive to build and maintain, and the value of building this feature (and, particularly, of building it to use a correct "address book" algorithm on real names) seems extremely low.

We have a huge, huge list of features to build. We'll never get to a point where features which provide as little value as this would provide are at the top of the priority queue, particularly given that a good implementation to solve either problem is not trivial so the overall cost-to-benefit ratio is very high.

The "Wontfix" here isn't "this is a bad feature", it's "this feature provides so little value that we will always have more important/valuable features to build, so the task isn't worth keeping around because there's no realistic way we'll ever get to it".

We might reconsider if there's a concrete problem, but expecting the directory to sort like an address book and finding it surprising that it doesn't is very minor, and examining the result list makes it clear that the directory is not sorted alphabetically so this issue is self-correcting. I think the browse-to-find-a-user use case is incredibly rare, and alphabetical sorting isn't a very good solution anyway.

It seems obvious to me that A to Z ordering by username excluding disabled users should be the default query (exactly like is done in Projects which excludes archived ones in the default query), and then you could allow sorting my creation date and others.

For the 'disabled' part see also D10565

Thanks, see D10480 for a more complete approach to that.