From 5fee24fa43119d531057af33415b30589373b601 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 15 May 2017 06:36:28 -0700 Subject: [PATCH] (stable) Add required needMembers/needWatchers calls to Project Profile/Subprojects tabs Summary: Fixes T12710. See that task for discussion. This is pretty ugly/redundant but not broken. (Feel free to reject this and pursue something else.) Test Plan: - For a project with active subprojects/milestones, viewed the project profile and subprojects tabs. - After patch: they're ugly, but no longer fatal. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12710 Differential Revision: https://secure.phabricator.com/D17882 --- .../controller/PhabricatorProjectProfileController.php | 2 ++ .../controller/PhabricatorProjectSubprojectsController.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 4c726f5884..60254ddcca 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -262,6 +262,8 @@ final class PhabricatorProjectProfileController ->setViewer($viewer) ->withParentProjectPHIDs(array($project->getPHID())) ->needImages(true) + ->needMembers(true) + ->needWatchers(true) ->withStatuses( array( PhabricatorProjectStatus::STATUS_ACTIVE, diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php index 4a89bb4cde..a25a41fad0 100644 --- a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php +++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php @@ -31,6 +31,8 @@ final class PhabricatorProjectSubprojectsController ->setViewer($viewer) ->withParentProjectPHIDs(array($project->getPHID())) ->needImages(true) + ->needMembers(true) + ->needWatchers(true) ->withIsMilestone(false) ->execute(); } else { @@ -42,6 +44,8 @@ final class PhabricatorProjectSubprojectsController ->setViewer($viewer) ->withParentProjectPHIDs(array($project->getPHID())) ->needImages(true) + ->needMembers(true) + ->needWatchers(true) ->withIsMilestone(true) ->setOrderVector(array('milestoneNumber', 'id')) ->execute();