mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +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:
parent
24a6eeb8d8
commit
664507e450
1 changed files with 12 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue