1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Use ManiphestTaskQuery instead of ad-hoc load in Maniphest reports

Summary: Fixes T5829. This stuff is old and busted, but keep it working for now.

Test Plan: No more fatal when there are recently closed tasks.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5829

Differential Revision: https://secure.phabricator.com/D10201
This commit is contained in:
epriestley 2014-08-08 16:21:53 -07:00
parent 24a6eeb8d8
commit 664507e450

View file

@ -671,9 +671,9 @@ final class ManiphestReportController extends ManiphestController {
$open_status_list[] = json_encode((string)$constant);
}
$tasks = queryfx_all(
$rows = queryfx_all(
$conn_r,
'SELECT t.* FROM %T t JOIN %T x ON x.objectPHID = t.phid
'SELECT t.id FROM %T t JOIN %T x ON x.objectPHID = t.phid
WHERE t.status NOT IN (%Ls)
AND x.oldValue IN (null, %Ls)
AND x.newValue NOT IN (%Ls)
@ -687,7 +687,16 @@ final class ManiphestReportController extends ManiphestController {
$window_epoch,
$window_epoch);
return id(new ManiphestTask())->loadAllFromArray($tasks);
if (!$rows) {
return array();
}
$ids = ipull($rows, 'id');
return id(new ManiphestTaskQuery())
->setViewer($this->getRequest()->getUser())
->withIDs($ids)
->execute();
}
/**