mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 09:58:24 +01:00
Fix sorting bug in ProjectDatasource
Summary: See https://discourse.phabricator-community.org/t/typeahead-returning-only-archived-results/2220. Ref T12538. If a user has more than 100 disabled projects matching their search term, only disabled projects will be returned in the typeahead search results. Test Plan: Harcoded hard limit in `PhabricatorTypeaheadModularDatasourceController` to force truncation of search results, observed active project on top of results as expected. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12538 Differential Revision: https://secure.phabricator.com/D19907
This commit is contained in:
parent
46052878b1
commit
95ea4f11b9
2 changed files with 7 additions and 1 deletions
|
@ -187,6 +187,11 @@ final class PhabricatorProjectQuery
|
|||
'column' => 'milestoneNumber',
|
||||
'type' => 'int',
|
||||
),
|
||||
'status' => array(
|
||||
'table' => $this->getPrimaryTableAlias(),
|
||||
'column' => 'status',
|
||||
'type' => 'int',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ final class PhabricatorProjectDatasource
|
|||
|
||||
$query = id(new PhabricatorProjectQuery())
|
||||
->needImages(true)
|
||||
->needSlugs(true);
|
||||
->needSlugs(true)
|
||||
->setOrderVector(array('-status', 'id'));
|
||||
|
||||
if ($this->getPhase() == self::PHASE_PREFIX) {
|
||||
$prefix = $this->getPrefixQuery();
|
||||
|
|
Loading…
Add table
Reference in a new issue