diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 73bf6b54c9..0271e9f3a2 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -565,16 +565,10 @@ final class ManiphestTaskDetailController extends ManiphestController { $column = head(array_intersect_key($columns, $in_column_phids)); if ($column) { $column_name = pht('(%s)', $column->getDisplayName()); - // TODO: This is really hacky but there's no cleaner way to do it - // right now, T4022 should give us better tools for this. - $column_href = str_replace( - 'project/view', - 'project/board', - $handle->getURI()); $column_link = phutil_tag( 'a', array( - 'href' => $column_href, + 'href' => $handle->getURI().'board/', 'class' => 'maniphest-board-link', ), $column_name); diff --git a/src/applications/project/application/PhabricatorApplicationProject.php b/src/applications/project/application/PhabricatorApplicationProject.php index b2e441aeb5..de193b5837 100644 --- a/src/applications/project/application/PhabricatorApplicationProject.php +++ b/src/applications/project/application/PhabricatorApplicationProject.php @@ -79,6 +79,7 @@ final class PhabricatorApplicationProject extends PhabricatorApplication { ), '/tag/' => array( '(?P[^/]+)/' => 'PhabricatorProjectProfileController', + '(?P[^/]+)/board/' => 'PhabricatorProjectBoardViewController', ), ); } diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index f1c8c05704..b085428896 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -4,6 +4,7 @@ final class PhabricatorProjectBoardViewController extends PhabricatorProjectBoardController { private $id; + private $slug; private $handles; private $queryKey; private $filter; @@ -13,7 +14,8 @@ final class PhabricatorProjectBoardViewController } public function willProcessRequest(array $data) { - $this->id = $data['id']; + $this->id = idx($data, 'id'); + $this->slug = idx($data, 'slug'); $this->queryKey = idx($data, 'queryKey'); $this->filter = (bool)idx($data, 'filter'); } @@ -24,12 +26,17 @@ final class PhabricatorProjectBoardViewController $project = id(new PhabricatorProjectQuery()) ->setViewer($viewer) - ->needImages(true) - ->withIDs(array($this->id)) - ->executeOne(); + ->needImages(true); + if ($this->slug) { + $project->withSlugs(array($this->slug)); + } else { + $project->withIDs(array($this->id)); + } + $project = $project->executeOne(); if (!$project) { return new Aphront404Response(); } + $this->setProject($project); $columns = id(new PhabricatorProjectColumnQuery())