1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +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:
epriestley 2018-01-04 14:44:01 -08:00
parent 5543592034
commit adbd7d4fd8

View file

@ -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',