diff --git a/src/applications/project/controller/PhabricatorProjectColumnEditController.php b/src/applications/project/controller/PhabricatorProjectColumnEditController.php --- a/src/applications/project/controller/PhabricatorProjectColumnEditController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnEditController.php @@ -49,6 +49,11 @@ $v_limit = $column->getPointLimit(); $v_name = $column->getName(); + $milestone = null; + if ($column->getProxy()) { + $milestone = $column->getProxy(); + } + $validation_exception = null; $view_uri = $project->getWorkboardURI(); @@ -78,34 +83,43 @@ $type_name = PhabricatorProjectColumnNameTransaction::TRANSACTIONTYPE; $type_limit = PhabricatorProjectColumnLimitTransaction::TRANSACTIONTYPE; - if (!$column->getProxy()) { + if (!$milestone) { $xactions[] = id(new PhabricatorProjectColumnTransaction()) ->setTransactionType($type_name) ->setNewValue($v_name); } + // Column Points $xactions[] = id(new PhabricatorProjectColumnTransaction()) ->setTransactionType($type_limit) ->setNewValue($v_limit); + $saved_everything = false; + try { $editor = id(new PhabricatorProjectColumnTransactionEditor()) ->setActor($viewer) ->setContinueOnNoEffect(true) ->setContentSourceFromRequest($request) ->applyTransactions($column, $xactions); - return id(new AphrontRedirectResponse())->setURI($view_uri); + $saved_everything = true; } catch (PhabricatorApplicationTransactionValidationException $ex) { $e_name = $ex->getShortMessage($type_name); $e_limit = $ex->getShortMessage($type_limit); $validation_exception = $ex; } + + if ($saved_everything) { + return id(new AphrontRedirectResponse())->setURI($view_uri); + } + } $form = id(new AphrontFormView()) ->setUser($request->getUser()); - if (!$column->getProxy()) { + if (!$milestone) { + // Project Column name field $form->appendChild( id(new AphrontFormTextControl()) ->setValue($v_name)