Differential D8622 Diff 20459 src/applications/maniphest/controller/ManiphestSubpriorityController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/controller/ManiphestSubpriorityController.php
Show All 39 Lines | if ($request->getInt('after')) { | ||||
$after_pri = $request->getInt('priority'); | $after_pri = $request->getInt('priority'); | ||||
$after_sub = null; | $after_sub = null; | ||||
} | } | ||||
$xactions = array(id(new ManiphestTransaction()) | $xactions = array(id(new ManiphestTransaction()) | ||||
->setTransactionType(ManiphestTransaction::TYPE_SUBPRIORITY) | ->setTransactionType(ManiphestTransaction::TYPE_SUBPRIORITY) | ||||
->setNewValue(array( | ->setNewValue(array( | ||||
'newPriority' => $after_pri, | 'newPriority' => $after_pri, | ||||
'newSubpriorityBase' => $after_sub))); | 'newSubpriorityBase' => $after_sub, | ||||
'direction' => '>'))); | |||||
$editor = id(new ManiphestTransactionEditor()) | $editor = id(new ManiphestTransactionEditor()) | ||||
->setActor($user) | ->setActor($user) | ||||
->setContinueOnMissingFields(true) | ->setContinueOnMissingFields(true) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContentSourceFromRequest($request); | ->setContentSourceFromRequest($request); | ||||
$editor->applyTransactions($task, $xactions); | $editor->applyTransactions($task, $xactions); | ||||
return id(new AphrontAjaxResponse())->setContent( | return id(new AphrontAjaxResponse())->setContent( | ||||
array( | array( | ||||
'tasks' => $this->renderSingleTask($task), | 'tasks' => $this->renderSingleTask($task), | ||||
)); | )); | ||||
} | } | ||||
} | } |