Possible to define Edit Subtasks queries?

Is it possible to define a query in such a way that it appears inside the “Edit subtasks” list?

Sometimes these 4 just don’t completely cut it. (or offer too much information)

image

MyDeveloperDay

I realize that potentially given the comment in PhabricatorObjectRelationshipSource.php that this could probably be more general, but to answer my own question, adding the following small change of showing those tasks I am subscribed to really helped. (which tends to be everything in my project)

There are a lot of tasks being created in our system for lots of different projects that I’m not interested in, being able to filter out those other projects reduced the list so I could see the “wood for the trees”

Unfortunately in such a system, “All open objects” and “All objects” are less useful. “Assigned to Me” and “Created by Me” are great, but that doesn’t show me tasks logged by others which have not been triaged yet.

As it is so simple I thought I’d share it here…would be wonderful in the future if I could use my public and private maniphest queries, but for now this helps.

image

diff --git a/src/applications/search/controller/PhabricatorSearchRelationshipSourceController.php b/src/applications/search/controller/PhabricatorSearchRelationshipSourceController.php
index 4a96727..4d76a22 100644
--- a/src/applications/search/controller/PhabricatorSearchRelationshipSourceController.php
+++ b/src/applications/search/controller/PhabricatorSearchRelationshipSourceController.php
@@ -43,6 +43,10 @@ final class PhabricatorSearchRelationshipSourceController
       case 'open':
         $query->setParameter('statuses', array($status_open));
         break;
+      case 'subscribed':
+        $query->setParameter('subscriberPHIDs', array($viewer->getPHID()));
+        $query->setParameter('statuses', array($status_open));
+        break;
     }

     $query->setParameter('excludePHIDs', array($request->getStr('exclude')));
diff --git a/src/applications/search/relationship/PhabricatorObjectRelationshipSource.php b/src/applications/search/relationship/PhabricatorObjectRelationshipSource.php
index 9990740..d8a4384 100644
--- a/src/applications/search/relationship/PhabricatorObjectRelationshipSource.php
+++ b/src/applications/search/relationship/PhabricatorObjectRelationshipSource.php
@@ -39,7 +39,8 @@ abstract class PhabricatorObjectRelationshipSource extends Phobject {
     // rewritten when we move to ApplicationSearch.
     return array(
       'assigned' => pht('Assigned to Me'),
-      'created' => pht('Created By Me'),
+      'created' => pht('Created by Me'),
+      'subscribed' => pht('Subscribed to by Me'),
       'open' => pht('All Open Objects'),
       'all' => pht('All Objects'),
     );