From 2951e0c86bfacb44a5ef1c8b3e880acc7c0bd8b2 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 7 Jun 2018 09:59:11 -0700 Subject: [PATCH] Include owners packages in the MailableFunction datasource Summary: Ref T13151. See PHI684. Currently, the `MailableFunction` datasource does not include Owners packages, but they are valid subscribers and the `Mailable` datasource includes them. Include them in the `MailableFunction` datasource, too. Test Plan: Searched for revisions with particular package subscribers, got expected results in the UI (tokenizer knew about packages) and response. Reviewers: amckinley, jmeador Reviewed By: jmeador Maniphest Tasks: T13151 Differential Revision: https://secure.phabricator.com/D19476 --- .../PhabricatorMetaMTAMailableFunctionDatasource.php | 4 +++- .../search/field/PhabricatorSearchSubscribersField.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php b/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php index 68cb0e79b2..4b231b959e 100644 --- a/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php +++ b/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php @@ -8,7 +8,8 @@ final class PhabricatorMetaMTAMailableFunctionDatasource } public function getPlaceholderText() { - return pht('Type a username, project, mailing list, or function...'); + return pht( + 'Type a username, project, mailing list, package, or function...'); } public function getDatasourceApplicationClass() { @@ -21,6 +22,7 @@ final class PhabricatorMetaMTAMailableFunctionDatasource new PhabricatorPeopleDatasource(), new PhabricatorProjectMembersDatasource(), new PhabricatorProjectDatasource(), + new PhabricatorOwnersPackageDatasource(), ); } diff --git a/src/applications/search/field/PhabricatorSearchSubscribersField.php b/src/applications/search/field/PhabricatorSearchSubscribersField.php index 7102f33910..f3cf2094e9 100644 --- a/src/applications/search/field/PhabricatorSearchSubscribersField.php +++ b/src/applications/search/field/PhabricatorSearchSubscribersField.php @@ -10,6 +10,7 @@ final class PhabricatorSearchSubscribersField protected function getValueFromRequest(AphrontRequest $request, $key) { $allow_types = array( PhabricatorProjectProjectPHIDType::TYPECONST, + PhabricatorOwnersPackagePHIDType::TYPECONST, ); return $this->getUsersFromRequest($request, $key, $allow_types); }