@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -1
+5
src/applications/project/query/PhabricatorProjectQuery.php
··· 187 187 'column' => 'milestoneNumber', 188 188 'type' => 'int', 189 189 ), 190 + 'status' => array( 191 + 'table' => $this->getPrimaryTableAlias(), 192 + 'column' => 'status', 193 + 'type' => 'int', 194 + ), 190 195 ); 191 196 } 192 197
+2 -1
src/applications/project/typeahead/PhabricatorProjectDatasource.php
··· 26 26 27 27 $query = id(new PhabricatorProjectQuery()) 28 28 ->needImages(true) 29 - ->needSlugs(true); 29 + ->needSlugs(true) 30 + ->setOrderVector(array('-status', 'id')); 30 31 31 32 if ($this->getPhase() == self::PHASE_PREFIX) { 32 33 $prefix = $this->getPrefixQuery();