Commit 46b61d7b authored by Daniel Stone's avatar Daniel Stone Committed by Ana Rute Mendes

CCU: Ignore restricted child tasks for progress bar

If we have a child task which we can't access, ManiphestTaskQuery will
raise an exception; trying to view the workboard, this will bubble up as
a policy exception which will (incorrectly) tell the viewer they can't
access the project.

Catch any exceptions whilst trying to calculate overall progress, and
ignore those restricted child tasks.
parent edf4171f
......@@ -430,10 +430,17 @@ final class ManiphestTask extends ManiphestDAO
$children = $this->loadDependsOnTaskPHIDs();
foreach ($children as $child) {
$task = id(new ManiphestTaskQuery())
try {
$task = id(new ManiphestTaskQuery())
} catch (Exception $e) {
$task = null;
if (!$task) {
$child_progress = $task->getTaskProgress($viewer);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment