1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

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
This commit is contained in:
epriestley 2016-02-12 13:55:32 -08:00
parent 1e3a5bd2c0
commit bec21d80a5
2 changed files with 5 additions and 0 deletions

View file

@ -50,6 +50,10 @@ final class PhabricatorProjectBoardImportController
if ($import_column->isHidden()) { if ($import_column->isHidden()) {
continue; continue;
} }
if ($import_column->getProxy()) {
continue;
}
$new_column = PhabricatorProjectColumn::initializeNewColumn($viewer) $new_column = PhabricatorProjectColumn::initializeNewColumn($viewer)
->setSequence($import_column->getSequence()) ->setSequence($import_column->getSequence())
->setProjectPHID($project->getPHID()) ->setProjectPHID($project->getPHID())

View file

@ -91,6 +91,7 @@ final class PhabricatorProjectColumnHideController
$editor = id(new PhabricatorProjectColumnTransactionEditor()) $editor = id(new PhabricatorProjectColumnTransactionEditor())
->setActor($viewer) ->setActor($viewer)
->setContinueOnNoEffect(true) ->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->setContentSourceFromRequest($request) ->setContentSourceFromRequest($request)
->applyTransactions($column, $xactions); ->applyTransactions($column, $xactions);
} }