@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.

Allow projects to be queried by slug in "project.search"

Summary:
Ref T13102. See PHI461. An install is interested in querying projects by slug.

I think I omitted this capability originally only because we're not consistent about what slugs are called (they are "Slugs" internally, but "Hashtags" in the UI).

However, this ship has sort of already sailed because the results have a "slug" field. Just expose this as "slugs" for consistency with the existing API field and try to smooth thing over with a little documentation hint.

Test Plan: Queried for projects by slug, got the desired results back.

Maniphest Tasks: T13102

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

+12
+12
src/applications/project/query/PhabricatorProjectSearchEngine.php
··· 23 23 id(new PhabricatorSearchTextField()) 24 24 ->setLabel(pht('Name')) 25 25 ->setKey('name'), 26 + id(new PhabricatorSearchStringListField()) 27 + ->setLabel(pht('Slugs')) 28 + ->setIsHidden(true) 29 + ->setKey('slugs') 30 + ->setDescription( 31 + pht( 32 + 'Search for projects with particular slugs. (Slugs are the same '. 33 + 'as project hashtags.)')), 26 34 id(new PhabricatorUsersSearchField()) 27 35 ->setLabel(pht('Members')) 28 36 ->setKey('memberPHIDs') ··· 79 87 if (strlen($map['name'])) { 80 88 $tokens = PhabricatorTypeaheadDatasource::tokenizeString($map['name']); 81 89 $query->withNameTokens($tokens); 90 + } 91 + 92 + if ($map['slugs']) { 93 + $query->withSlugs($map['slugs']); 82 94 } 83 95 84 96 if ($map['memberPHIDs']) {