Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15448591
D8937.id21207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8937.id21207.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
@@ -201,6 +201,7 @@
'ConduitAPI_maniphest_gettasktransactions_Method' => 'applications/maniphest/conduit/ConduitAPI_maniphest_gettasktransactions_Method.php',
'ConduitAPI_maniphest_info_Method' => 'applications/maniphest/conduit/ConduitAPI_maniphest_info_Method.php',
'ConduitAPI_maniphest_query_Method' => 'applications/maniphest/conduit/ConduitAPI_maniphest_query_Method.php',
+ 'ConduitAPI_maniphest_querystatuses_Method' => 'applications/maniphest/conduit/ConduitAPI_maniphest_querystatuses_Method.php',
'ConduitAPI_maniphest_update_Method' => 'applications/maniphest/conduit/ConduitAPI_maniphest_update_Method.php',
'ConduitAPI_nuance_Method' => 'applications/nuance/conduit/ConduitAPI_nuance_Method.php',
'ConduitAPI_nuance_createitem_Method' => 'applications/nuance/conduit/ConduitAPI_nuance_createitem_Method.php',
@@ -2813,6 +2814,7 @@
'ConduitAPI_maniphest_gettasktransactions_Method' => 'ConduitAPI_maniphest_Method',
'ConduitAPI_maniphest_info_Method' => 'ConduitAPI_maniphest_Method',
'ConduitAPI_maniphest_query_Method' => 'ConduitAPI_maniphest_Method',
+ 'ConduitAPI_maniphest_querystatuses_Method' => 'ConduitAPI_maniphest_Method',
'ConduitAPI_maniphest_update_Method' => 'ConduitAPI_maniphest_Method',
'ConduitAPI_nuance_Method' => 'ConduitAPIMethod',
'ConduitAPI_nuance_createitem_Method' => 'ConduitAPI_nuance_Method',
diff --git a/src/applications/maniphest/conduit/ConduitAPI_maniphest_querystatuses_Method.php b/src/applications/maniphest/conduit/ConduitAPI_maniphest_querystatuses_Method.php
new file mode 100644
--- /dev/null
+++ b/src/applications/maniphest/conduit/ConduitAPI_maniphest_querystatuses_Method.php
@@ -0,0 +1,35 @@
+<?php
+
+final class ConduitAPI_maniphest_querystatuses_Method
+ extends ConduitAPI_maniphest_Method {
+
+ public function getMethodDescription() {
+ return "Retrieve information about possible Maniphest Task status values.";
+ }
+
+ public function defineParamTypes() {
+ return array();
+ }
+
+ public function defineReturnType() {
+ return 'nonempty dict<string, wild>';
+ }
+
+ public function defineErrorTypes() {
+ return array();
+ }
+
+ protected function execute(ConduitAPIRequest $request) {
+ $results = array(
+ 'defaultStatus' => ManiphestTaskStatus::getDefaultStatus(),
+ 'defaultClosedStatus' => ManiphestTaskStatus::getDefaultClosedStatus(),
+ 'duplicateStatus' => ManiphestTaskStatus::getDuplicateStatus(),
+ 'openStatuses' => ManiphestTaskStatus::getOpenStatusConstants(),
+ 'closedStatuses' => ManiphestTaskStatus::getClosedStatusConstants(),
+ 'allStatuses' => array_keys(ManiphestTaskStatus::getTaskStatusMap()),
+ 'statusMap' => ManiphestTaskStatus::getTaskStatusMap()
+ );
+ return $results;
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 29, 5:49 AM (5 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7715966
Default Alt Text
D8937.id21207.diff (2 KB)
Attached To
Mode
D8937: Maniphest - add conduit method to get status information
Attached
Detach File
Event Timeline
Log In to Comment