Commit ef5cb063 authored by epriestley's avatar epriestley
Browse files

Provide a link to parent/child tasks as a search result from task graphs

Ref T4788. Add links to jump to search results with a task's parents or subtasks. This allows relationships to remain useful if there are a zillion of them, and you can sort/filter stuff more easily.

Language might need some tweaking at some point, feeling a little un-brainy today with wordstuff.

Test Plan:


Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision:
parent cebf4bbe
......@@ -106,7 +106,51 @@ final class ManiphestTaskDetailController extends ManiphestController {
$graph_table = $task_graph->newGraphTable();
$view->addPropertySection(pht('Task Graph'), $graph_table);
$parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST;
$subtask_type = ManiphestTaskDependsOnTaskEdgeType::EDGECONST;
$parent_map = $task_graph->getEdges($parent_type);
$subtask_map = $task_graph->getEdges($subtask_type);
$has_parents = (bool)idx($parent_map, $task->getPHID());
$has_subtasks = (bool)idx($subtask_map, $task->getPHID());
$parents_uri = urisprintf(
$parents_uri = $this->getApplicationURI($parents_uri);
$subtasks_uri = urisprintf(
$subtasks_uri = $this->getApplicationURI($subtasks_uri);
$dropdown_menu = id(new PhabricatorActionListView())
id(new PhabricatorActionView())
->setName(pht('Search Parent Tasks'))
id(new PhabricatorActionView())
->setName(pht('Search Subtasks'))
$graph_menu = id(new PHUIButtonView())
$graph_header = id(new PHUIHeaderView())
->setHeader(pht('Task Graph'))
$view->addPropertySection($graph_header, $graph_table);
return $this->newPage()
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