From efc7e7cd7ee3293f91ca35cb2af9b79a5a82a03c Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 23 Sep 2013 14:31:58 -0700 Subject: [PATCH] Point Maniphest reports at new transaction table Summary: Ref T2217. Drive reports out of the new table. Nothing too magical going on here. Also fixes a bug with one of the links from reports. Test Plan: Viewed reports. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2217 Differential Revision: https://secure.phabricator.com/D7081 --- .../maniphest/controller/ManiphestReportController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 59e46c0d42..240ecb63ef 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -79,14 +79,14 @@ final class ManiphestReportController extends ManiphestController { $handle = $handles[$project_phid]; } - $table = new ManiphestTransaction(); + $table = new ManiphestTransactionPro(); $conn = $table->establishConnection('r'); $joins = ''; if ($project_phid) { $joins = qsprintf( $conn, - 'JOIN %T t ON x.taskID = t.id + 'JOIN %T t ON x.objectPHID = t.phid JOIN %T p ON p.taskPHID = t.phid AND p.projectPHID = %s', id(new ManiphestTask())->getTableName(), id(new ManiphestTaskProject())->getTableName(), @@ -522,7 +522,7 @@ final class ManiphestReportController extends ManiphestController { $row[] = phutil_tag( 'a', array( - 'href' => '/maniphest/view/custom/?s=oc&tasks='.$task_ids, + 'href' => '/maniphest/?ids='.$task_ids, 'target' => '_blank', ), number_format(count($closed))); @@ -652,12 +652,12 @@ final class ManiphestReportController extends ManiphestController { list($ignored, $window_epoch) = $this->getWindow(); $table = new ManiphestTask(); - $xtable = new ManiphestTransaction(); + $xtable = new ManiphestTransactionPro(); $conn_r = $table->establishConnection('r'); $tasks = queryfx_all( $conn_r, - 'SELECT t.* FROM %T t JOIN %T x ON x.taskID = t.id + 'SELECT t.* FROM %T t JOIN %T x ON x.objectPHID = t.phid WHERE t.status != 0 AND x.oldValue IN (null, %s, %s) AND x.newValue NOT IN (%s, %s)