From bec21d80a58403a388d175cd14f994ba7adefd3f Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 12 Feb 2016 13:55:32 -0800 Subject: [PATCH] Don't try to import proxy columns Summary: Fixes T10346. You finally wrung a clue out of the reporter and I think I figured this out. Here's the bug: - Create a project with a workboard and subprojects/milestones. - Create a new project, import columns from the first project. - We incorrectly import empty columns for the subprojects/milestons. Instead, skip proxy columns during import. Also, allow "hide column" to continue on missing fields, so columns with no name can be hidden. Test Plan: - Did the stuff above. - Workboard no longer populated with a bunch of "Unnamed Column" columns. - Hid several "Unnamed Column" columns. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10346 Differential Revision: https://secure.phabricator.com/D15265 --- .../controller/PhabricatorProjectBoardImportController.php | 4 ++++ .../controller/PhabricatorProjectColumnHideController.php | 1 + 2 files changed, 5 insertions(+) diff --git a/src/applications/project/controller/PhabricatorProjectBoardImportController.php b/src/applications/project/controller/PhabricatorProjectBoardImportController.php index 8df4e8b810..988084d3ee 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardImportController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardImportController.php @@ -50,6 +50,10 @@ final class PhabricatorProjectBoardImportController if ($import_column->isHidden()) { continue; } + if ($import_column->getProxy()) { + continue; + } + $new_column = PhabricatorProjectColumn::initializeNewColumn($viewer) ->setSequence($import_column->getSequence()) ->setProjectPHID($project->getPHID()) diff --git a/src/applications/project/controller/PhabricatorProjectColumnHideController.php b/src/applications/project/controller/PhabricatorProjectColumnHideController.php index 41665ea6f8..27dbb17c47 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnHideController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnHideController.php @@ -91,6 +91,7 @@ final class PhabricatorProjectColumnHideController $editor = id(new PhabricatorProjectColumnTransactionEditor()) ->setActor($viewer) ->setContinueOnNoEffect(true) + ->setContinueOnMissingFields(true) ->setContentSourceFromRequest($request) ->applyTransactions($column, $xactions); }