From 0ae9e2c75d1f65ebcb20449051540fc8278e2ec9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 29 Jun 2019 14:16:09 -0700 Subject: [PATCH] Remove property "id" from Workboard View controller Summary: Depends on D20626. Ref T4900. On this controller, "id" is a separate property, but serves little purpose and complicates separating state management. Remove it. Test Plan: Bulk edited a column, managed filters, did show/hide on columns, edited a column. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T4900 Differential Revision: https://secure.phabricator.com/D20627 --- .../PhabricatorProjectBoardViewController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index 7d4d47e61b..7d5c28d884 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -5,7 +5,6 @@ final class PhabricatorProjectBoardViewController const BATCH_EDIT_ALL = 'all'; - private $id; private $queryKey; private $sortKey; private $showHidden; @@ -284,7 +283,7 @@ final class PhabricatorProjectBoardViewController $query_key = $saved_query->getQueryKey(); $bulk_uri = new PhutilURI("/maniphest/bulk/query/{$query_key}/"); - $bulk_uri->replaceQueryParam('board', $this->id); + $bulk_uri->replaceQueryParam('board', $project->getID()); return id(new AphrontRedirectResponse()) ->setURI($bulk_uri); @@ -781,7 +780,6 @@ final class PhabricatorProjectBoardViewController $project = $this->getProject(); $this->showHidden = $request->getBool('hidden'); - $this->id = $project->getID(); $sort_key = $this->getDefaultSort($project); @@ -931,7 +929,7 @@ final class PhabricatorProjectBoardViewController if ($is_custom) { $uri = $this->getApplicationURI( - 'board/'.$this->id.'/filter/query/'.$key.'/'); + 'board/'.$project->getID().'/filter/query/'.$key.'/'); $item->setWorkflow(true); } else { $uri = $engine->getQueryResultsPageURI($key); @@ -1179,7 +1177,7 @@ final class PhabricatorProjectBoardViewController ->setIcon('fa-search') ->setHref($query_uri); - $edit_uri = 'board/'.$this->id.'/edit/'.$column->getID().'/'; + $edit_uri = 'board/'.$project->getID().'/edit/'.$column->getID().'/'; $column_items[] = id(new PhabricatorActionView()) ->setName(pht('Edit Column')) ->setIcon('fa-pencil') @@ -1188,7 +1186,7 @@ final class PhabricatorProjectBoardViewController ->setWorkflow(true); $can_hide = ($can_edit && !$column->isDefaultColumn()); - $hide_uri = 'board/'.$this->id.'/hide/'.$column->getID().'/'; + $hide_uri = 'board/'.$project->getID().'/hide/'.$column->getID().'/'; $hide_uri = $this->getApplicationURI($hide_uri); $hide_uri = $this->getURIWithState($hide_uri);