From 965c2e6732b52c5f5d27280cd1ff1a2c19e6554b Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 14 Nov 2013 10:13:20 -0800 Subject: [PATCH] Add a default "Subscribed" query to Maniphest Summary: Although I don't want to end up with 20 of these again, this is a reasonable default to provide, particularly for installs where a large portion of the userbase primarily reports bugs and does not interact with them directly. Test Plan: Hit `/maniphest/`, saw "Subscribed", clicked it, saw the tasks I'm subscribed to. Reviewers: jbrown, btrahan Reviewed By: jbrown CC: aran Maniphest Tasks: T4100 Differential Revision: https://secure.phabricator.com/D7586 --- .../maniphest/query/ManiphestTaskSearchEngine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index 1a793e98c1..09882fba55 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -362,6 +362,7 @@ final class ManiphestTaskSearchEngine if ($this->requireViewer()->isLoggedIn()) { $names['assigned'] = pht('Assigned'); $names['authored'] = pht('Authored'); + $names['subscribed'] = pht('Subscribed'); } $names['open'] = pht('Open Tasks'); @@ -384,6 +385,10 @@ final class ManiphestTaskSearchEngine return $query ->setParameter('assignedPHIDs', array($viewer_phid)) ->setParameter('statuses', array(ManiphestTaskStatus::STATUS_OPEN)); + case 'subscribed': + return $query + ->setParameter('subscriberPHIDs', array($viewer_phid)) + ->setParameter('statuses', array(ManiphestTaskStatus::STATUS_OPEN)); case 'open': return $query ->setParameter('statuses', array(ManiphestTaskStatus::STATUS_OPEN));