Differential D18111 Diff 43615 src/applications/project/controller/PhabricatorProjectMoveController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectMoveController.php
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | foreach ($try as $spec) { | ||||
list($pri, $sub) = ManiphestTransactionEditor::getAdjacentSubpriority( | list($pri, $sub) = ManiphestTransactionEditor::getAdjacentSubpriority( | ||||
$task, | $task, | ||||
$is_after); | $is_after); | ||||
// If we find a priority on the first try, don't keep going. | // If we find a priority on the first try, don't keep going. | ||||
break; | break; | ||||
} | } | ||||
$keyword_map = ManiphestTaskPriority::getTaskPriorityKeywordsMap(); | |||||
$keyword = head(idx($keyword_map, $pri)); | |||||
$xactions = array(); | $xactions = array(); | ||||
if ($pri !== null) { | if ($pri !== null) { | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType(ManiphestTaskPriorityTransaction::TRANSACTIONTYPE) | ->setTransactionType(ManiphestTaskPriorityTransaction::TRANSACTIONTYPE) | ||||
->setNewValue($pri); | ->setNewValue($keyword); | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType( | ->setTransactionType( | ||||
ManiphestTaskSubpriorityTransaction::TRANSACTIONTYPE) | ManiphestTaskSubpriorityTransaction::TRANSACTIONTYPE) | ||||
->setNewValue($sub); | ->setNewValue($sub); | ||||
} | } | ||||
return $xactions; | return $xactions; | ||||
} | } | ||||
Show All 39 Lines |