@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show rest of task page when graph errors out

Summary: T15772.

Test Plan: Add a `throw` statement in graph calculation, load a task that has a graph, see message.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25570

+16 -7
+16 -7
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 81 81 $graph_menu = null; 82 82 83 83 $graph_limit = 200; 84 - $overflow_message = null; 84 + $graph_error_message = null; 85 85 $task_graph = id(new ManiphestTaskGraph()) 86 86 ->setViewer($viewer) 87 87 ->setSeedPHID($task->getPHID()) ··· 102 102 // the search button to browse tasks with the search UI instead. 103 103 $direct_count = count($parent_list) + count($subtask_list); 104 104 105 + $graph_table = null; 105 106 if ($direct_count > $graph_limit) { 106 - $overflow_message = pht( 107 + $graph_error_message = pht( 107 108 'This task is directly connected to more than %s other tasks. '. 108 109 'Use %s to browse parents or subtasks, or %s to show more of the '. 109 110 'graph.', ··· 111 112 phutil_tag('strong', array(), pht('Search...')), 112 113 phutil_tag('strong', array(), pht('View Standalone Graph'))); 113 114 114 - $graph_table = null; 115 115 } else { 116 116 // If there aren't too many direct tasks, but there are too many total 117 117 // tasks, we'll only render directly connected tasks. 118 118 if ($task_graph->isOverLimit()) { 119 119 $task_graph->setRenderOnlyAdjacentNodes(true); 120 120 121 - $overflow_message = pht( 121 + $graph_error_message = pht( 122 122 'This task is connected to more than %s other tasks. '. 123 123 'Only direct parents and subtasks are shown here. Use '. 124 124 '%s to show more of the graph.', ··· 126 126 phutil_tag('strong', array(), pht('View Standalone Graph'))); 127 127 } 128 128 129 - $graph_table = $task_graph->newGraphTable(); 129 + try { 130 + $graph_table = $task_graph->newGraphTable(); 131 + } catch (Throwable $ex) { 132 + phlog($ex); 133 + $graph_error_message = pht( 134 + 'There was an unexpected error displaying the task graph. '. 135 + 'Use %s to browse parents or subtasks, or %s to show the graph.', 136 + phutil_tag('strong', array(), pht('Search...')), 137 + phutil_tag('strong', array(), pht('View Standalone Graph'))); 138 + } 130 139 } 131 140 132 - if ($overflow_message) { 141 + if ($graph_error_message) { 133 142 $overflow_view = $this->newTaskGraphOverflowView( 134 143 $task, 135 - $overflow_message, 144 + $graph_error_message, 136 145 true); 137 146 138 147 $graph_table = array(