@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.

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

Summary:
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:
{F1740855}

{F1740856}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4788

Differential Revision: https://secure.phabricator.com/D16343

+45 -1
+45 -1
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 106 106 $graph_table = $task_graph->newGraphTable(); 107 107 } 108 108 109 - $view->addPropertySection(pht('Task Graph'), $graph_table); 109 + $parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST; 110 + $subtask_type = ManiphestTaskDependsOnTaskEdgeType::EDGECONST; 111 + 112 + $parent_map = $task_graph->getEdges($parent_type); 113 + $subtask_map = $task_graph->getEdges($subtask_type); 114 + 115 + $has_parents = (bool)idx($parent_map, $task->getPHID()); 116 + $has_subtasks = (bool)idx($subtask_map, $task->getPHID()); 117 + 118 + $parents_uri = urisprintf( 119 + '/?subtaskIDs=%d#R', 120 + $task->getID()); 121 + $parents_uri = $this->getApplicationURI($parents_uri); 122 + 123 + $subtasks_uri = urisprintf( 124 + '/?parentIDs=%d#R', 125 + $task->getID()); 126 + $subtasks_uri = $this->getApplicationURI($subtasks_uri); 127 + 128 + $dropdown_menu = id(new PhabricatorActionListView()) 129 + ->setViewer($viewer) 130 + ->addAction( 131 + id(new PhabricatorActionView()) 132 + ->setHref($parents_uri) 133 + ->setName(pht('Search Parent Tasks')) 134 + ->setDisabled(!$has_parents) 135 + ->setIcon('fa-chevron-circle-up')) 136 + ->addAction( 137 + id(new PhabricatorActionView()) 138 + ->setHref($subtasks_uri) 139 + ->setName(pht('Search Subtasks')) 140 + ->setDisabled(!$has_subtasks) 141 + ->setIcon('fa-chevron-circle-down')); 142 + 143 + $graph_menu = id(new PHUIButtonView()) 144 + ->setTag('a') 145 + ->setIcon('fa-search') 146 + ->setText(pht('Search...')) 147 + ->setDropdownMenu($dropdown_menu); 148 + 149 + $graph_header = id(new PHUIHeaderView()) 150 + ->setHeader(pht('Task Graph')) 151 + ->addActionLink($graph_menu); 152 + 153 + $view->addPropertySection($graph_header, $graph_table); 110 154 } 111 155 112 156 return $this->newPage()