Don't show any subproject tags on workboard cards

Summary: Ref T10010. This gets rid of, e.g., the "Iteration I" tag in the column for that milestone, as it is redundant with the column itself.

Test Plan: {F1090427}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D15181
This commit is contained in:
epriestley
2016-02-03 17:21:38 -08:00
parent 90a0459821
commit 2bdbd7833d
4 changed files with 54 additions and 14 deletions

View File

@@ -195,12 +195,30 @@ final class PhabricatorProjectMoveController
))
->executeOne();
$except_phids = array($board_phid);
if ($project->getHasSubprojects() || $project->getHasMilestones()) {
$descendants = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withAncestorProjectPHIDs($except_phids)
->execute();
foreach ($descendants as $descendant) {
$except_phids[] = $descendant->getPHID();
}
}
$except_phids = array_fuse($except_phids);
$handle_phids = array_fuse($object->getProjectPHIDs());
$handle_phids = array_diff_key($handle_phids, $except_phids);
$project_handles = $viewer->loadHandles($handle_phids);
$project_handles = iterator_to_array($project_handles);
$card = id(new ProjectBoardTaskCard())
->setViewer($viewer)
->setTask($object)
->setOwner($owner)
->setCanEdit(true)
->setProject($project)
->setProjectHandles($project_handles)
->getItem();
$card->addClass('phui-workcard');