Page MenuHomePhabricator

D17155.diff
No OneTemporary

D17155.diff

diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php
--- a/src/applications/project/query/PhabricatorProjectSearchEngine.php
+++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php
@@ -52,6 +52,17 @@
->setLabel(pht('Colors'))
->setKey('colors')
->setOptions($this->getColorOptions()),
+ id(new PhabricatorPHIDsSearchField())
+ ->setLabel(pht('Parent Projects'))
+ ->setKey('parentPHIDs')
+ ->setAliases(array('parent', 'parents', 'parentPHID'))
+ ->setDescription(pht('Find direct subprojects of specified parents.')),
+ id(new PhabricatorPHIDsSearchField())
+ ->setLabel(pht('Ancestor Projects'))
+ ->setKey('ancestorPHIDs')
+ ->setAliases(array('ancestor', 'ancestors', 'ancestorPHID'))
+ ->setDescription(
+ pht('Find all subprojects beneath specified ancestors.')),
);
}
@@ -91,6 +102,14 @@
$query->withIsMilestone($map['isMilestone']);
}
+ if ($map['parentPHIDs']) {
+ $query->withParentProjectPHIDs($map['parentPHIDs']);
+ }
+
+ if ($map['ancestorPHIDs']) {
+ $query->withAncestorProjectPHIDs($map['ancestorPHIDs']);
+ }
+
return $query;
}

File Metadata

Mime Type
text/plain
Expires
Wed, May 15, 10:44 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6272812
Default Alt Text
D17155.diff (1 KB)

Event Timeline