1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00

Fix task graph fatal for graphs containing restricted tasks

Summary: Fixes T11392. If some tasks are restricted, we only have PHIDs for them, not objects. Just use the PHIDs instead.

Test Plan: {F1741335}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11392

Differential Revision: https://secure.phabricator.com/D16345
This commit is contained in:
epriestley 2016-07-29 07:02:36 -07:00
parent 15c7eb1425
commit bbc2ae7858

View file

@ -74,12 +74,10 @@ final class ManiphestTaskGraph
$link = $viewer->renderHandle($phid);
}
if ($this->isParentTask($object)) {
if ($this->isParentTask($phid)) {
$marker = 'fa-chevron-circle-up bluegrey';
$marker_tip = pht('Direct Parent');
} else if ($this->isChildTask($object)) {
} else if ($this->isChildTask($phid)) {
$marker = 'fa-chevron-circle-down bluegrey';
$marker_tip = pht('Direct Subtask');
} else {
@ -128,14 +126,14 @@ final class ManiphestTaskGraph
));
}
private function isParentTask(ManiphestTask $task) {
private function isParentTask($task_phid) {
$map = $this->getSeedMap(ManiphestTaskDependedOnByTaskEdgeType::EDGECONST);
return isset($map[$task->getPHID()]);
return isset($map[$task_phid]);
}
private function isChildTask(ManiphestTask $task) {
private function isChildTask($task_phid) {
$map = $this->getSeedMap(ManiphestTaskDependsOnTaskEdgeType::EDGECONST);
return isset($map[$task->getPHID()]);
return isset($map[$task_phid]);
}
private function getSeedMap($type) {