Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14008623
D16304.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D16304.diff
View Options
Index: src/applications/maniphest/controller/ManiphestTaskDetailController.php
===================================================================
--- src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -30,30 +30,7 @@
->setViewer($viewer)
->setTargetObject($task);
- $e_commit = ManiphestTaskHasCommitEdgeType::EDGECONST;
- $e_rev = ManiphestTaskHasRevisionEdgeType::EDGECONST;
- $e_mock = ManiphestTaskHasMockEdgeType::EDGECONST;
- $phid = $task->getPHID();
-
- $query = id(new PhabricatorEdgeQuery())
- ->withSourcePHIDs(array($phid))
- ->withEdgeTypes(
- array(
- $e_commit,
- $e_rev,
- $e_mock,
- ));
- $edges = idx($query->execute(), $phid);
- $phids = array_fill_keys($query->getDestinationPHIDs(), true);
-
- if ($task->getOwnerPHID()) {
- $phids[$task->getOwnerPHID()] = true;
- }
- $phids[$task->getAuthorPHID()] = true;
-
- $phids = array_keys($phids);
- $handles = $viewer->loadHandles($phids);
$timeline = $this->buildTransactionTimeline(
$task,
@@ -65,7 +42,6 @@
->setBorder(true);
$header = $this->buildHeaderView($task);
- $details = $this->buildPropertyView($task, $field_list, $edges, $handles);
$description = $this->buildDescriptionView($task);
$curtain = $this->buildCurtain($task, $edit_engine);
@@ -84,10 +60,18 @@
$timeline,
$comment_view,
))
- ->addPropertySection(pht('Description'), $description)
- ->addPropertySection(pht('Details'), $details);
+ ->addPropertySection(pht('Description'), $description);
- $graph_limit = 100;
+ $edge_types = array(
+ ManiphestTaskHasRevisionEdgeType::EDGECONST
+ => pht('Differential Revisions'),
+ ManiphestTaskHasCommitEdgeType::EDGECONST => true,
+ ManiphestTaskHasMockEdgeType::EDGECONST
+ => pht('Pholio Mocks'),
+
+ );
+
+ $graph_limit = 50;
$task_graph = id(new ManiphestTaskGraph())
->setViewer($viewer)
->setSeedPHID($task->getPHID())
@@ -95,19 +79,36 @@
->loadGraph();
if (!$task_graph->isEmpty()) {
if ($task_graph->isOverLimit()) {
- $message = pht(
- 'Task graph too large to display (this task is connected to '.
- 'more than %s other tasks).',
- $graph_limit);
- $message = phutil_tag('em', array(), $message);
- $graph_table = id(new PHUIPropertyListView())
- ->addTextContent($message);
+ $edge_types += array(
+ ManiphestTaskDependedOnByTaskEdgeType::EDGECONST
+ => pht('Parent Tasks'),
+ ManiphestTaskDependsOnTaskEdgeType::EDGECONST
+ => pht('Subtasks'),
+ );
} else {
$graph_table = $task_graph->newGraphTable();
+ $view->addPropertySection(pht('Task Graph'), $graph_table);
}
+ }
+
+ $phid = $task->getPHID();
- $view->addPropertySection(pht('Task Graph'), $graph_table);
+ $query = id(new PhabricatorEdgeQuery())
+ ->withSourcePHIDs(array($phid))
+ ->withEdgeTypes(array_keys($edge_types));
+ $edges = idx($query->execute(), $phid);
+ $phids = array_fill_keys($query->getDestinationPHIDs(), true);
+ unset($edge_types[ManiphestTaskHasCommitEdgeType::EDGECONST]);
+ if ($task->getOwnerPHID()) {
+ $phids[$task->getOwnerPHID()] = true;
}
+ $phids[$task->getAuthorPHID()] = true;
+
+ $phids = array_keys($phids);
+ $handles = $viewer->loadHandles($phids);
+ $details = $this->buildPropertyView(
+ $task, $field_list, $edge_types, $edges, $handles);
+ $view->addPropertySection(pht('Details'), $details);
return $this->newPage()
->setTitle($title)
@@ -276,6 +277,7 @@
private function buildPropertyView(
ManiphestTask $task,
PhabricatorCustomFieldList $field_list,
+ array $edge_types,
array $edges,
$handles) {
@@ -304,13 +306,6 @@
}
}
- $edge_types = array(
- ManiphestTaskHasRevisionEdgeType::EDGECONST
- => pht('Differential Revisions'),
- ManiphestTaskHasMockEdgeType::EDGECONST
- => pht('Pholio Mocks'),
- );
-
$revisions_commits = array();
$commit_phids = array_keys(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 31, 2:37 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733901
Default Alt Text
D16304.diff (4 KB)
Attached To
Mode
D16304: Fall back to parent tasks / subtasks when the task graph is big
Attached
Detach File
Event Timeline
Log In to Comment