Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18512716
D16343.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D16343.id.diff
View Options
diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -106,7 +106,51 @@
$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(
+ '/?subtaskIDs=%d#R',
+ $task->getID());
+ $parents_uri = $this->getApplicationURI($parents_uri);
+
+ $subtasks_uri = urisprintf(
+ '/?parentIDs=%d#R',
+ $task->getID());
+ $subtasks_uri = $this->getApplicationURI($subtasks_uri);
+
+ $dropdown_menu = id(new PhabricatorActionListView())
+ ->setViewer($viewer)
+ ->addAction(
+ id(new PhabricatorActionView())
+ ->setHref($parents_uri)
+ ->setName(pht('Search Parent Tasks'))
+ ->setDisabled(!$has_parents)
+ ->setIcon('fa-chevron-circle-up'))
+ ->addAction(
+ id(new PhabricatorActionView())
+ ->setHref($subtasks_uri)
+ ->setName(pht('Search Subtasks'))
+ ->setDisabled(!$has_subtasks)
+ ->setIcon('fa-chevron-circle-down'));
+
+ $graph_menu = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setIcon('fa-search')
+ ->setText(pht('Search...'))
+ ->setDropdownMenu($dropdown_menu);
+
+ $graph_header = id(new PHUIHeaderView())
+ ->setHeader(pht('Task Graph'))
+ ->addActionLink($graph_menu);
+
+ $view->addPropertySection($graph_header, $graph_table);
}
return $this->newPage()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sep 6 2025, 8:29 AM (8 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8419543
Default Alt Text
D16343.id.diff (2 KB)
Attached To
Mode
D16343: Provide a link to parent/child tasks as a search result from task graphs
Attached
Detach File
Event Timeline
Log In to Comment