Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F22993962
D16304.id39211.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D16304.id39211.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,20 @@
$timeline,
$comment_view,
))
- ->addPropertySection(pht('Description'), $description)
- ->addPropertySection(pht('Details'), $details);
+ ->addPropertySection(pht('Description'), $description);
+
+ $edge_types = array(
+ ManiphestTaskHasRevisionEdgeType::EDGECONST
+ => pht('Differential Revisions'),
+ ManiphestTaskHasCommitEdgeType::EDGECONST
+ => pht('Commits'),
+ ManiphestTaskHasMockEdgeType::EDGECONST
+ => pht('Pholio Mocks'),
+
+ );
- $graph_limit = 100;
+
+ $graph_limit = 50;
$task_graph = id(new ManiphestTaskGraph())
->setViewer($viewer)
->setSeedPHID($task->getPHID())
@@ -95,19 +81,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);
+
+ 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 +279,7 @@
private function buildPropertyView(
ManiphestTask $task,
PhabricatorCustomFieldList $field_list,
+ array $edge_types,
array $edges,
$handles) {
@@ -304,13 +308,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
Fri, Nov 13, 8:34 AM (23 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
17405029
Default Alt Text
D16304.id39211.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