Page MenuHomePhabricator

D14760.diff
No OneTemporary

D14760.diff

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

Mime Type
text/plain
Expires
Oct 19 2024, 7:42 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733055
Default Alt Text
D14760.diff (4 KB)

Event Timeline