From a84cc777c841e0b40829ba4e2a895472bf4409d9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 14 Aug 2013 09:00:56 -0700 Subject: [PATCH] Remove "Project ID" from Releeph Projects Summary: Fixes T3660. Releeph Projects currently have an unused one-to-one mapping to Phabricator projects. This isn't consistent with other applications and has no integrations or uses. Get rid of it. NOTE: Waiting for signoff from @legneato on T3660 before pulling the trigger here. Test Plan: Created and edited Releeph projects. Grepped for references to project ID; there are a dozen or so but they're all either Releeph projects or Arcanist projects. Reviewers: btrahan Reviewed By: btrahan CC: LegNeato, aran Maniphest Tasks: T3660 Differential Revision: https://secure.phabricator.com/D6635 --- resources/sql/patches/20130731.releephproject.sql | 2 ++ .../controller/project/ReleephProjectEditController.php | 9 --------- src/applications/releeph/storage/ReleephProject.php | 8 -------- .../storage/patch/PhabricatorBuiltinPatchList.php | 4 ++++ 4 files changed, 6 insertions(+), 17 deletions(-) create mode 100644 resources/sql/patches/20130731.releephproject.sql diff --git a/resources/sql/patches/20130731.releephproject.sql b/resources/sql/patches/20130731.releephproject.sql new file mode 100644 index 0000000000..a208df452d --- /dev/null +++ b/resources/sql/patches/20130731.releephproject.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_releeph.releeph_project + DROP projectID; diff --git a/src/applications/releeph/controller/project/ReleephProjectEditController.php b/src/applications/releeph/controller/project/ReleephProjectEditController.php index efd07de47d..220bbb37aa 100644 --- a/src/applications/releeph/controller/project/ReleephProjectEditController.php +++ b/src/applications/releeph/controller/project/ReleephProjectEditController.php @@ -13,8 +13,6 @@ final class ReleephProjectEditController extends ReleephProjectController { $project_name = $request->getStr('name', $this->getReleephProject()->getName()); - $phabricator_project_id = $request->getInt('projectID', - $this->getReleephProject()->getProjectID()); $trunk_branch = $request->getStr('trunkBranch', $this->getReleephProject()->getTrunkBranch()); $branch_template = $request->getStr('branchTemplate'); @@ -81,7 +79,6 @@ final class ReleephProjectEditController extends ReleephProjectController { } $project = $this->getReleephProject() - ->setProjectID($phabricator_project_id) ->setTrunkBranch($trunk_branch) ->setDetail('pushers', $pusher_phids) ->setDetail('pick_failure_instructions', $pick_failure_instructions) @@ -173,12 +170,6 @@ final class ReleephProjectEditController extends ReleephProjectController { ->setLabel(pht('Releeph Project PHID')) ->setValue( $this->getReleephProject()->getPHID())) - ->appendChild( - id(new AphrontFormSelectControl()) - ->setLabel(pht('Phabricator Project')) - ->setValue($phabricator_project_id) - ->setName('projectID') - ->setOptions($projects)) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Trunk')) diff --git a/src/applications/releeph/storage/ReleephProject.php b/src/applications/releeph/storage/ReleephProject.php index e961f9cd88..5568fb905e 100644 --- a/src/applications/releeph/storage/ReleephProject.php +++ b/src/applications/releeph/storage/ReleephProject.php @@ -22,7 +22,6 @@ final class ReleephProject extends ReleephDAO protected $isActive; protected $createdByUserPHID; protected $arcanistProjectID; - protected $projectID; protected $details = array(); @@ -76,13 +75,6 @@ final class ReleephProject extends ReleephDAO } } - public function loadPhabricatorProject() { - if ($id = $this->getProjectID()) { - return id(new PhabricatorProject())->load($id); - } - return id(new PhabricatorProject())->makeEphemeral(); // dummy - } - public function loadArcanistProject() { return $this->loadOneRelative( new PhabricatorRepositoryArcanistProject(), diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 6c3441cbe6..f3ca066322 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -1539,6 +1539,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('20130731.releephrepoid.sql'), ), + '20130731.releephproject.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('20130731.releephproject.sql'), + ), ); } }