Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15413162
D17155.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17155.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 5:18 PM (1 w, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7596348
Default Alt Text
D17155.diff (1 KB)
Attached To
Mode
D17155: Support "parentPHIDs" and "ancestorPHIDs" as constraints in project.search API
Attached
Detach File
Event Timeline
Log In to Comment