Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13978521
D14760.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D14760.id.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1288,6 +1288,7 @@
'ManiphestReplyHandler' => 'applications/maniphest/mail/ManiphestReplyHandler.php',
'ManiphestReportController' => 'applications/maniphest/controller/ManiphestReportController.php',
'ManiphestSchemaSpec' => 'applications/maniphest/storage/ManiphestSchemaSpec.php',
+ 'ManiphestSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php',
'ManiphestSearchIndexer' => 'applications/maniphest/search/ManiphestSearchIndexer.php',
'ManiphestStatusConfigOptionType' => 'applications/maniphest/config/ManiphestStatusConfigOptionType.php',
'ManiphestStatusEmailCommand' => 'applications/maniphest/command/ManiphestStatusEmailCommand.php',
@@ -5282,6 +5283,7 @@
'ManiphestReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
'ManiphestReportController' => 'ManiphestController',
'ManiphestSchemaSpec' => 'PhabricatorConfigSchemaSpec',
+ 'ManiphestSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
'ManiphestSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
'ManiphestStatusConfigOptionType' => 'PhabricatorConfigJSONOptionType',
'ManiphestStatusEmailCommand' => 'ManiphestEmailCommand',
@@ -5300,6 +5302,7 @@
'PhabricatorApplicationTransactionInterface',
'PhabricatorProjectInterface',
'PhabricatorSpacesInterface',
+ 'PhabricatorConduitResultInterface',
),
'ManiphestTaskAssignHeraldAction' => 'HeraldAction',
'ManiphestTaskAssignOtherHeraldAction' => 'ManiphestTaskAssignHeraldAction',
diff --git a/src/applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php
new file mode 100644
--- /dev/null
+++ b/src/applications/maniphest/conduit/ManiphestSearchConduitAPIMethod.php
@@ -0,0 +1,18 @@
+<?php
+
+final class ManiphestSearchConduitAPIMethod
+ extends PhabricatorSearchEngineAPIMethod {
+
+ public function getAPIMethodName() {
+ return 'maniphest.search';
+ }
+
+ public function newSearchEngine() {
+ return new ManiphestTaskSearchEngine();
+ }
+
+ public function getMethodSummary() {
+ return pht('Read information about tasks.');
+ }
+
+}
diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php
--- a/src/applications/maniphest/storage/ManiphestTask.php
+++ b/src/applications/maniphest/storage/ManiphestTask.php
@@ -13,7 +13,8 @@
PhabricatorDestructibleInterface,
PhabricatorApplicationTransactionInterface,
PhabricatorProjectInterface,
- PhabricatorSpacesInterface {
+ PhabricatorSpacesInterface,
+ PhabricatorConduitResultInterface {
const MARKUP_FIELD_DESCRIPTION = 'markup:desc';
@@ -392,4 +393,48 @@
return $this->spacePHID;
}
+
+/* -( PhabricatorConduitResultInterface )---------------------------------- */
+
+
+ public function getFieldSpecificationsForConduit() {
+ return array(
+ 'title' => array(
+ 'type' => 'string',
+ 'description' => pht('The name of the object.'),
+ ),
+ 'authorPHID' => array(
+ 'type' => 'phid',
+ 'description' => pht('Original task author.'),
+ ),
+ 'ownerPHID' => array(
+ 'type' => 'phid?',
+ 'description' => pht('Current task owner.'),
+ ),
+ 'status' => array(
+ 'type' => 'string',
+ 'description' => pht('Current task status.'),
+ ),
+ 'priority' => array(
+ 'type' => 'int',
+ 'description' => pht('Task priority.'),
+ ),
+ 'subpriority' => array(
+ 'type' => 'double',
+ 'description' => pht('Order within priority level.'),
+ ),
+ );
+ }
+
+ public function getFieldValuesForConduit() {
+ return array(
+ 'name' => $this->getTitle(),
+ 'authorPHID' => $this->getAuthorPHID(),
+ 'ownerPHID' => $this->getOwnerPHID(),
+ 'status' => $this->getStatus(),
+ 'priority' => (int)$this->getPriority(),
+ 'subpriority' => (double)$this->getSubpriority(),
+ );
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 19 2024, 11:36 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733055
Default Alt Text
D14760.id.diff (4 KB)
Attached To
Mode
D14760: Add "maniphest.search" Conduit API endpoint
Attached
Detach File
Event Timeline
Log In to Comment