From 9baae00fbd02e50a72595d7a53ff010a1bf76745 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 23 Feb 2016 14:41:36 -0800 Subject: [PATCH] Fix a couple of column editing issues Summary: Ref T10349. - Don't show subproject columns on "Manage Board". - Fix "Edit Column" for milestone columns (allows you to set points, but not rename). Test Plan: - Viewed "Manage Board" on a project with subprojects. - Edited a milestone column and set a point limit. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10349 Differential Revision: https://secure.phabricator.com/D15338 --- .../controller/PhabricatorProjectBoardManageController.php | 5 +++++ .../controller/PhabricatorProjectColumnEditController.php | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectBoardManageController.php b/src/applications/project/controller/PhabricatorProjectBoardManageController.php index db4dfe31be..75bff07106 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardManageController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardManageController.php @@ -152,6 +152,11 @@ final class PhabricatorProjectBoardManageController foreach ($columns as $column) { $column_id = $column->getID(); + $proxy = $column->getProxy(); + if ($proxy && !$proxy->isMilestone()) { + continue; + } + $detail_uri = "/project/board/{$board_id}/column/{$column_id}/"; $item = id(new PHUIObjectItemView()) diff --git a/src/applications/project/controller/PhabricatorProjectColumnEditController.php b/src/applications/project/controller/PhabricatorProjectColumnEditController.php index 9f880b9515..fb0c7b0910 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnEditController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnEditController.php @@ -81,14 +81,15 @@ final class PhabricatorProjectColumnEditController $xactions = array(); + $type_name = PhabricatorProjectColumnTransaction::TYPE_NAME; + $type_limit = PhabricatorProjectColumnTransaction::TYPE_LIMIT; + if (!$column->getProxy()) { - $type_name = PhabricatorProjectColumnTransaction::TYPE_NAME; $xactions[] = id(new PhabricatorProjectColumnTransaction()) ->setTransactionType($type_name) ->setNewValue($v_name); } - $type_limit = PhabricatorProjectColumnTransaction::TYPE_LIMIT; $xactions[] = id(new PhabricatorProjectColumnTransaction()) ->setTransactionType($type_limit) ->setNewValue($v_limit); @@ -97,6 +98,7 @@ final class PhabricatorProjectColumnEditController $editor = id(new PhabricatorProjectColumnTransactionEditor()) ->setActor($viewer) ->setContinueOnNoEffect(true) + ->setContinueOnMissingFields(true) ->setContentSourceFromRequest($request) ->applyTransactions($column, $xactions); return id(new AphrontRedirectResponse())->setURI($view_uri);