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

Support Owners document types for Current Application global search scope

Summary:
`PhabricatorMainMenuSearchView::getGlobalSearchScopeItems()` checks `if ($application->getApplicationSearchDocumentTypes())` and later sets `'value' => $application_value` (if existing) to only search for document types supported by the Current Application.
This works for most applications (e.g. setting Maniphest as the Current Application and Tasks as Document Type when being on http://phorge.localhost/maniphest/).
It does not work for Owners when being on http://phorge.localhost/owners/ - global search results are not restricted to Owners when selecting "Current Application".

Fix that by adding the missing function `PhabricatorOwnersApplication::getApplicationSearchDocumentTypes()`.

Closes T16166

Test Plan:
* Go to http://phorge.localhost/owners/
* In the upper right corner, select the search scope dropdown and see the default application icon in front of "Current Application"
* Before this patch "Current Application" has a generic icon; after this patch "Current Application" has the Owners icon
* Select "Current Application", enter a search term, press Enter key
* On the results page, before this patch the "Document Types" field is empty and results come from any applications; after this patch the "Document Types" field is set to "Owners Package" and results only come from the Owners application which was/is our Current Application per the URI where we started

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16166

Differential Revision: https://we.phorge.it/D26174

+6
+6
src/applications/owners/application/PhabricatorOwnersApplication.php
··· 79 79 ); 80 80 } 81 81 82 + public function getApplicationSearchDocumentTypes() { 83 + return array( 84 + PhabricatorOwnersPackagePHIDType::TYPECONST, 85 + ); 86 + } 87 + 82 88 }