Migrate existing projects to retain "Workboard" as default item

Summary:
Ref T10054. Ref T6961.

  - Existing projects with workboards had "Workboard" as the default menu item. Retain this behavior.
  - Populate the recently-added `hasWorkboard` flag so we can do a couple of things a little faster (see T6961).

Test Plan:
  - Ran migration.
  - Verified a bunch of projects looked sensible/correct after the migration.
  - Created a workboard, verified `hasWorkboard` got set properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6961, T10054

Differential Revision: https://secure.phabricator.com/D15093
This commit is contained in:
epriestley
2016-01-22 07:40:11 -08:00
parent b64d67f47a
commit 9f56a014e2
4 changed files with 68 additions and 10 deletions

View File

@@ -769,6 +769,8 @@ final class PhabricatorProjectBoardViewController
->setProjectPHID($project->getPHID())
->save();
$project->setHasWorkboard(1)->save();
return id(new AphrontRedirectResponse())
->setURI($board_uri);
case 'import':