mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
Make the new synthetic burnup chart data respect the "Project" filter
Summary: See PHI273. Third time's the charm? This page has a "Project" filter which lets you view data for only one project, but the synthetic data currently ignores it. Test Plan: Filtered burnup chart by various projects, saw sensible-looking data. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D18860
This commit is contained in:
parent
5543592034
commit
adbd7d4fd8
1 changed files with 10 additions and 2 deletions
|
@ -75,6 +75,7 @@ final class ManiphestReportController extends ManiphestController {
|
|||
$conn = $table->establishConnection('r');
|
||||
|
||||
$joins = '';
|
||||
$create_joins = '';
|
||||
if ($project_phid) {
|
||||
$joins = qsprintf(
|
||||
$conn,
|
||||
|
@ -84,6 +85,12 @@ final class ManiphestReportController extends ManiphestController {
|
|||
PhabricatorEdgeConfig::TABLE_NAME_EDGE,
|
||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
|
||||
$project_phid);
|
||||
$create_joins = qsprintf(
|
||||
$conn,
|
||||
'JOIN %T p ON p.src = t.phid AND p.type = %d AND p.dst = %s',
|
||||
PhabricatorEdgeConfig::TABLE_NAME_EDGE,
|
||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
|
||||
$project_phid);
|
||||
}
|
||||
|
||||
$data = queryfx_all(
|
||||
|
@ -113,8 +120,9 @@ final class ManiphestReportController extends ManiphestController {
|
|||
// default value.
|
||||
$create_rows = queryfx_all(
|
||||
$conn,
|
||||
'SELECT dateCreated FROM %T',
|
||||
id(new ManiphestTask())->getTableName());
|
||||
'SELECT t.dateCreated FROM %T t %Q',
|
||||
id(new ManiphestTask())->getTableName(),
|
||||
$create_joins);
|
||||
foreach ($create_rows as $key => $create_row) {
|
||||
$create_rows[$key] = array(
|
||||
'transactionType' => 'status',
|
||||
|
|
Loading…
Reference in a new issue