mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Maniphest - add conduit method to get status information
Summary: Ref T4938. `arc close` needs to know about custom statuses and this conduit method is step 1 of letting it know Test Plan: See next diff, which works! Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T4938 Differential Revision: https://secure.phabricator.com/D8937
This commit is contained in:
parent
f32662a729
commit
d1d6924dfa
2 changed files with 37 additions and 0 deletions
|
@ -201,6 +201,7 @@ phutil_register_library_map(array(
|
|||
'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',
|
||||
|
@ -2814,6 +2815,7 @@ phutil_register_library_map(array(
|
|||
'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',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue