1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +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'); $conn = $table->establishConnection('r');
$joins = ''; $joins = '';
$create_joins = '';
if ($project_phid) { if ($project_phid) {
$joins = qsprintf( $joins = qsprintf(
$conn, $conn,
@ -84,6 +85,12 @@ final class ManiphestReportController extends ManiphestController {
PhabricatorEdgeConfig::TABLE_NAME_EDGE, PhabricatorEdgeConfig::TABLE_NAME_EDGE,
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
$project_phid); $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( $data = queryfx_all(
@ -113,8 +120,9 @@ final class ManiphestReportController extends ManiphestController {
// default value. // default value.
$create_rows = queryfx_all( $create_rows = queryfx_all(
$conn, $conn,
'SELECT dateCreated FROM %T', 'SELECT t.dateCreated FROM %T t %Q',
id(new ManiphestTask())->getTableName()); id(new ManiphestTask())->getTableName(),
$create_joins);
foreach ($create_rows as $key => $create_row) { foreach ($create_rows as $key => $create_row) {
$create_rows[$key] = array( $create_rows[$key] = array(
'transactionType' => 'status', 'transactionType' => 'status',