diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php index 5c153be5a4..75c2045f50 100644 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -128,6 +128,10 @@ final class PhabricatorProjectSearchEngine $names['joined'] = pht('Joined'); } + if ($this->requireViewer()->isLoggedIn()) { + $names['watching'] = pht('Watching'); + } + $names['active'] = pht('Active'); $names['all'] = pht('All'); @@ -153,6 +157,10 @@ final class PhabricatorProjectSearchEngine return $query ->setParameter('memberPHIDs', array($viewer_phid)) ->setParameter('status', 'active'); + case 'watching': + return $query + ->setParameter('watcherPHIDs', array($viewer_phid)) + ->setParameter('status', 'active'); } return parent::buildSavedQueryFromBuiltin($query_key);