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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user