Homec4science

Sort project typeahead tokens by display name, not hashtag

Authored by epriestley <git@epriestley.com> on May 26 2016, 19:01.

Description

Sort project typeahead tokens by display name, not hashtag

Summary:
Fixes T8510. Results are internally ordered by "name", which is the full list of strings a user can type to match a result. On the balance, it is probably good/correct to order by this (particularly, it allows function(x) to sort near x).

However, the way projects were built put the tags first, so a project like "Discovery" could end up last if it had originally been created with a different name like "Search Team", so that its first slug is "search-team".

Instead, put the display name first in the ordering.

Test Plan:
{F1661775}

To reproduce in particular:

  • Create a project named "Zebra".
  • Create a lot of projects named "Armadillo-blahblahblah".
  • Rename "Zebra" to "Armadillo".

Before the patch, the new "Armadillo" project would still sort as though it were named "Zebra". After the patch, it sorts as expected normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D15981

Details

Committed
epriestley <git@epriestley.com>May 26 2016, 19:47
Pushed
aubortJan 31 2017, 17:16
Parents
rPH5b77b86ffbf9: Show translation option names natively, instead of in the current translation
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH727a7de75941: Sort project typeahead tokens by display name, not hashtag (authored by epriestley <git@epriestley.com>).May 26 2016, 19:47