Page MenuHomePhabricator

D18037.id43384.diff
No OneTemporary

D18037.id43384.diff

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
@@ -36,6 +36,7 @@
ManiphestTaskHasMockEdgeType::EDGECONST,
PhabricatorObjectMentionedByObjectEdgeType::EDGECONST,
PhabricatorObjectMentionsObjectEdgeType::EDGECONST,
+ ManiphestTaskHasDuplicateTaskEdgeType::EDGECONST,
);
$phid = $task->getPHID();
@@ -159,6 +160,7 @@
$related_tabs[] = $this->newMocksTab($task, $query);
$related_tabs[] = $this->newMentionsTab($task, $query);
+ $related_tabs[] = $this->newDuplicatesTab($task, $query);
$tab_view = null;
@@ -553,6 +555,32 @@
->appendChild($view);
}
+ private function newDuplicatesTab(
+ ManiphestTask $task,
+ PhabricatorEdgeQuery $edge_query) {
+
+ $in_type = ManiphestTaskHasDuplicateTaskEdgeType::EDGECONST;
+ $in_phids = $edge_query->getDestinationPHIDs(array(), array($in_type));
+
+ $viewer = $this->getViewer();
+ $in_handles = $viewer->loadHandles($in_phids);
+ $in_handles = $this->getCompleteHandles($in_handles);
+
+ $view = new PHUIPropertyListView();
+
+ if (!count($in_handles)) {
+ return null;
+ }
+
+ $view->addProperty(
+ pht('Duplicates Merged Here'), $in_handles->renderList());
+
+ return id(new PHUITabView())
+ ->setName(pht('Duplicates'))
+ ->setKey('duplicates')
+ ->appendChild($view);
+ }
+
private function getCompleteHandles(PhabricatorHandleList $handles) {
$phids = array();

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 28, 2:50 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7725061
Default Alt Text
D18037.id43384.diff (1 KB)

Event Timeline