Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/editor/ManiphestTransactionEditor.php
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | switch ($xaction->getTransactionType()) { | ||||
$object_phid = $object->getPHID(); | $object_phid = $object->getPHID(); | ||||
// We're doing layout with the ominpotent viewer to make sure we don't | // We're doing layout with the ominpotent viewer to make sure we don't | ||||
// remove positions in columns that exist, but which the actual actor | // remove positions in columns that exist, but which the actual actor | ||||
// can't see. | // can't see. | ||||
$omnipotent_viewer = PhabricatorUser::getOmnipotentUser(); | $omnipotent_viewer = PhabricatorUser::getOmnipotentUser(); | ||||
$select_phids = array($board_phid); | |||||
$descendants = id(new PhabricatorProjectQuery()) | |||||
->setViewer($omnipotent_viewer) | |||||
->withAncestorProjectPHIDs($select_phids) | |||||
->execute(); | |||||
foreach ($descendants as $descendant) { | |||||
$select_phids[] = $descendant->getPHID(); | |||||
} | |||||
$board_tasks = id(new ManiphestTaskQuery()) | $board_tasks = id(new ManiphestTaskQuery()) | ||||
->setViewer($omnipotent_viewer) | ->setViewer($omnipotent_viewer) | ||||
->withEdgeLogicPHIDs( | ->withEdgeLogicPHIDs( | ||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, | PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, | ||||
PhabricatorQueryConstraint::OPERATOR_AND, | PhabricatorQueryConstraint::OPERATOR_ANCESTOR, | ||||
array($board_phid)) | array($select_phids)) | ||||
->execute(); | ->execute(); | ||||
$object_phids = mpull($board_tasks, 'getPHID'); | $object_phids = mpull($board_tasks, 'getPHID'); | ||||
$object_phids[] = $object_phid; | $object_phids[] = $object_phid; | ||||
$engine = id(new PhabricatorBoardLayoutEngine()) | $engine = id(new PhabricatorBoardLayoutEngine()) | ||||
->setViewer($omnipotent_viewer) | ->setViewer($omnipotent_viewer) | ||||
->setBoardPHIDs(array($board_phid)) | ->setBoardPHIDs(array($board_phid)) | ||||
▲ Show 20 Lines • Show All 697 Lines • Show Last 20 Lines |