1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 02:42:40 +01:00

Correct a zero-based month tooltip on burnup charts

Summary: See PHI1017. This is a trivial fix even though these burnups are headed toward a grisly fate.

Test Plan: Moused over some January datapoints, saw "1" instead of "0".

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19967
This commit is contained in:
epriestley 2019-01-14 09:26:37 -08:00
parent 0b8f24dfd3
commit 3b94b3e812
3 changed files with 15 additions and 11 deletions

View file

@ -395,7 +395,7 @@ return array(
'rsrc/js/application/herald/PathTypeahead.js' => 'ad486db3', 'rsrc/js/application/herald/PathTypeahead.js' => 'ad486db3',
'rsrc/js/application/herald/herald-rule-editor.js' => '0922e81d', 'rsrc/js/application/herald/herald-rule-editor.js' => '0922e81d',
'rsrc/js/application/maniphest/behavior-batch-selector.js' => 'cffd39b4', 'rsrc/js/application/maniphest/behavior-batch-selector.js' => 'cffd39b4',
'rsrc/js/application/maniphest/behavior-line-chart.js' => '3e9da12d', 'rsrc/js/application/maniphest/behavior-line-chart.js' => 'c8147a20',
'rsrc/js/application/maniphest/behavior-list-edit.js' => 'c687e867', 'rsrc/js/application/maniphest/behavior-list-edit.js' => 'c687e867',
'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '8400307c', 'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '8400307c',
'rsrc/js/application/owners/OwnersPathEditor.js' => '2a8b62d9', 'rsrc/js/application/owners/OwnersPathEditor.js' => '2a8b62d9',
@ -614,7 +614,7 @@ return array(
'javelin-behavior-icon-composer' => '38a6cedb', 'javelin-behavior-icon-composer' => '38a6cedb',
'javelin-behavior-launch-icon-composer' => 'a17b84f1', 'javelin-behavior-launch-icon-composer' => 'a17b84f1',
'javelin-behavior-lightbox-attachments' => 'c7e748bf', 'javelin-behavior-lightbox-attachments' => 'c7e748bf',
'javelin-behavior-line-chart' => '3e9da12d', 'javelin-behavior-line-chart' => 'c8147a20',
'javelin-behavior-linked-container' => '74446546', 'javelin-behavior-linked-container' => '74446546',
'javelin-behavior-maniphest-batch-selector' => 'cffd39b4', 'javelin-behavior-maniphest-batch-selector' => 'cffd39b4',
'javelin-behavior-maniphest-list-editor' => 'c687e867', 'javelin-behavior-maniphest-list-editor' => 'c687e867',
@ -1200,12 +1200,6 @@ return array(
'javelin-vector', 'javelin-vector',
'javelin-dom', 'javelin-dom',
), ),
'3e9da12d' => array(
'javelin-behavior',
'javelin-dom',
'javelin-vector',
'phui-chart-css',
),
'3eed1f2b' => array( '3eed1f2b' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1950,6 +1944,12 @@ return array(
'phuix-icon-view', 'phuix-icon-view',
'phabricator-busy', 'phabricator-busy',
), ),
'c8147a20' => array(
'javelin-behavior',
'javelin-dom',
'javelin-vector',
'phui-chart-css',
),
'c9749dcd' => array( 'c9749dcd' => array(
'javelin-install', 'javelin-install',
'javelin-util', 'javelin-util',

View file

@ -74,8 +74,6 @@ final class ManiphestReportController extends ManiphestController {
$table = new ManiphestTransaction(); $table = new ManiphestTransaction();
$conn = $table->establishConnection('r'); $conn = $table->establishConnection('r');
$joins = '';
$create_joins = '';
if ($project_phid) { if ($project_phid) {
$joins = qsprintf( $joins = qsprintf(
$conn, $conn,
@ -91,6 +89,9 @@ final class ManiphestReportController extends ManiphestController {
PhabricatorEdgeConfig::TABLE_NAME_EDGE, PhabricatorEdgeConfig::TABLE_NAME_EDGE,
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
$project_phid); $project_phid);
} else {
$joins = qsprintf($conn, '');
$create_joins = qsprintf($conn, '');
} }
$data = queryfx_all( $data = queryfx_all(

View file

@ -107,7 +107,10 @@ JX.behavior('line-chart', function(config) {
.attr('cy', function(d) { return y(d.count); }) .attr('cy', function(d) { return y(d.count); })
.on('mouseover', function(d) { .on('mouseover', function(d) {
var d_y = d.date.getFullYear(); var d_y = d.date.getFullYear();
var d_m = d.date.getMonth();
// NOTE: Javascript months are zero-based. See PHI1017.
var d_m = d.date.getMonth() + 1;
var d_d = d.date.getDate(); var d_d = d.date.getDate();
div div