Fix two issues with unusual milestone workboard initialization orders
Summary: Fixes T10316. Fixes T10311. Test Plan: - Create a project, create a milestone, go back to the parent, go to the workboard. Previously, fatal. Now, prompts you to create workboard. - Create a project, create a milestone, create the parent workboard, put a task in the milestone's column, go to the milestone workboard. Previously, fatal. Now, prompts you to create workboard. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10311, T10316 Differential Revision: https://secure.phabricator.com/D15232
This commit is contained in:
@@ -126,11 +126,21 @@ final class PhabricatorProjectBoardViewController
|
||||
|
||||
$columns = $layout_engine->getColumns($board_phid);
|
||||
if (!$columns || !$project->getHasWorkboard()) {
|
||||
$has_normal_columns = false;
|
||||
|
||||
foreach ($columns as $column) {
|
||||
if (!$column->getProxyPHID()) {
|
||||
$has_normal_columns = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
$viewer,
|
||||
$project,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
if (!$columns) {
|
||||
|
||||
if (!$has_normal_columns) {
|
||||
if (!$can_edit) {
|
||||
$content = $this->buildNoAccessContent($project);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user