Page MenuHomePhabricator

D17013.id40932.diff
No OneTemporary

D17013.id40932.diff

diff --git a/src/applications/project/typeahead/PhabricatorProjectDatasource.php b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
--- a/src/applications/project/typeahead/PhabricatorProjectDatasource.php
+++ b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
@@ -102,10 +102,21 @@
}
$all_strings = array();
- $all_strings[] = $proj->getDisplayName();
+
+ // NOTE: We list the project's name first because results will be
+ // sorted into prefix vs content phases incorrectly if we don't: it
+ // will look like "Parent (Milestone)" matched "Parent" as a prefix,
+ // but it did not.
+ $all_strings[] = $proj->getName();
+
+ if ($proj->isMilestone()) {
+ $all_strings[] = $proj->getParentProject()->getName();
+ }
+
foreach ($proj->getSlugs() as $project_slug) {
$all_strings[] = $project_slug->getSlug();
}
+
$all_strings = implode("\n", $all_strings);
$proj_result = id(new PhabricatorTypeaheadResult())

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:46 PM (19 h, 25 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6914996
Default Alt Text
D17013.id40932.diff (1 KB)

Event Timeline