3 final class ManiphestCreateTaskConduitAPIMethod
4 extends ManiphestConduitAPIMethod
{
6 public function getAPIMethodName() {
7 return 'maniphest.createtask';
10 public function getMethodDescription() {
11 return pht('Create a new Maniphest task.');
14 public function getMethodStatus() {
15 return self
::METHOD_STATUS_FROZEN
;
18 public function getMethodStatusDescription() {
20 'This method is frozen and will eventually be deprecated. New code '.
21 'should use "maniphest.edit" instead.');
24 protected function defineParamTypes() {
25 return $this->getTaskFields($is_new = true);
28 protected function defineReturnType() {
29 return 'nonempty dict';
32 protected function defineErrorTypes() {
34 'ERR-INVALID-PARAMETER' => pht('Missing or malformed parameter.'),
38 protected function execute(ConduitAPIRequest
$request) {
39 $task = ManiphestTask
::initializeNewTask($request->getUser());
41 $task = $this->applyRequest($task, $request, $is_new = true);
43 return $this->buildTaskInfoDictionary($task);