Christopher Johnson (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/169605
Change subject: fix row arguments
......................................................................
fix row arguments
Change-Id: Ibad189b45c0cd379ea61ae4a78d0c8a094159e37
---
M src/view/BurndownDataView.php
M src/view/SprintReportBurndownView.php
M src/view/SprintReportOpenTasksView.php
3 files changed, 8 insertions(+), 35 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint
refs/changes/05/169605/1
diff --git a/src/view/BurndownDataView.php b/src/view/BurndownDataView.php
index ac8817b..d083cf2 100644
--- a/src/view/BurndownDataView.php
+++ b/src/view/BurndownDataView.php
@@ -6,17 +6,6 @@
final class BurndownDataView extends SprintView {
- // Array of BurndownDataDates
- // There are two special keys, 'before' and 'after'
- //
- // Looks like: array(
- // 'before' => BurndownDataDate
- // 'Tue Jun 3' => BurndownDataDate
- // 'Wed Jun 4' => BurndownDataDate
- // ...
- // 'after' => BurndownDataDate
- // )
-
private $dates;
private $data;
// Project associated with this burndown.
@@ -39,7 +28,6 @@
}
public function render() {
-
$chart = $this->buildC3Chart();
$tasks_table = $this->buildTasksTable();
$burndown_table = $this->buildBurnDownTable();
@@ -48,7 +36,6 @@
}
private function buildChartDataSet() {
-
$query = id(new SprintQuery())
->setProject($this->project)
->setViewer($this->viewer);
@@ -119,7 +106,6 @@
// Now loop through the events and build the data for each day
private function buildDailyData($events, $start, $end) {
-
foreach ($events as $event) {
$xaction = $this->xactions[$event['transactionPHID']];
@@ -240,7 +226,6 @@
}
private function changePoints($date, $task_phid, $xaction) {
-
$this->task_points[$task_phid] = $xaction->getNewValue();
// Only make changes if the task is in the sprint
@@ -296,7 +281,7 @@
*
* @returns PHUIObjectBoxView
*/
- public function buildBurnDownTable() {
+ private function buildBurnDownTable() {
$data = array();
$stats = id(new SprintBuildStats());
$stats->sumSprintStats($this->dates);
@@ -337,8 +322,7 @@
*
* @returns PHUIObjectBoxView
*/
- public function buildTasksTable() {
-
+ private function buildTasksTable() {
$rows = $this->buildTasksTree();
$table = id(new AphrontTableView($rows))
@@ -481,7 +465,7 @@
*
* @returns PHUIObjectBoxView
*/
- public function buildEventTable() {
+ private function buildEventTable() {
$query = id(new SprintQuery())
->setProject($this->project)
->setViewer($this->viewer);
diff --git a/src/view/SprintReportBurndownView.php
b/src/view/SprintReportBurndownView.php
index 8dc929e..51b3415 100644
--- a/src/view/SprintReportBurndownView.php
+++ b/src/view/SprintReportBurndownView.php
@@ -16,7 +16,6 @@
}
public function render() {
-
$filter = $this->BuildFilter();
$chart = $this->buildBurnDownChart();
$table = $this->buildStatsTable();
@@ -51,7 +50,6 @@
}
private function getProjectHandle($phids,$project_phid) {
-
$query = id(new SprintQuery())
->setPHID($project_phid);
@@ -91,7 +89,6 @@
}
private function buildStatsfromEvents ($data) {
-
$stats = array();
$data = $this->addTaskStatustoData ($data);
@@ -127,8 +124,7 @@
return $day_buckets;
}
- private function buildBucket($epoch, $format)
- {
+ private function buildBucket($epoch, $format) {
$bucket = phabricator_format_local_time(
$epoch,
$this->user,
@@ -198,7 +194,6 @@
}
private function renderCaption ($handle) {
-
$inst = pht(
'NOTE: This table reflects tasks currently in ' .
'the project. If a task was opened in the past but added to ' .
@@ -211,8 +206,8 @@
return array ($caption, $header);
}
- private function formatStatsTableHeaders($week, $month, $period) {
- if ($week) {
+ private function formatStatsTableHeaders($week, $month, $period,
$rows,$rowc) {
+ if ($week) {
$rows[] = $this->formatBurnRow(
pht('Week To Date'),
$week);
@@ -235,8 +230,8 @@
$rowc = array_reverse($rowc);
return array ($rows, $rowc);
}
- private function buildStatsTable() {
+ private function buildStatsTable() {
$handle = null;
$project_phid = $this->request->getStr('project');
@@ -252,7 +247,7 @@
list ($rows,$rowc, $week, $month, $period) = $this->formatBucketRows
($stats, $day_buckets);
list ($rows, $rowc) = $this->formatStatsTableHeaders($week, $month,
$period, $rows,$rowc);
-
+
$table = $this->StatsTableView($rows, $rowc);
if ($handle) {
diff --git a/src/view/SprintReportOpenTasksView.php
b/src/view/SprintReportOpenTasksView.php
index c2e0342..e7dfe31 100644
--- a/src/view/SprintReportOpenTasksView.php
+++ b/src/view/SprintReportOpenTasksView.php
@@ -38,7 +38,6 @@
}
public function render() {
-
$project_phid = $this->request->getStr('project');
$project_handle = null;
@@ -296,7 +295,6 @@
* Load all the tasks that have been recently closed.
*/
private function loadRecentlyClosedTasks() {
-
list(,, $window_epoch) = $this->getWindow();
$table = new ManiphestTask();
@@ -335,14 +333,12 @@
}
private function getOpenTasks($user) {
-
$query = $this->openStatusQuery($user);
$tasks = $query->execute();
return $tasks;
}
private function getOpenTasksforProject($user, $phids) {
-
$query = $this->openStatusQuery($user)->withAnyProjects($phids);
$tasks = $query->execute();
return $tasks;
@@ -356,7 +352,6 @@
}
private function getWindow() {
-
$window_str = $this->request->getStr('window', '12 AM 7 days ago');
$error = null;
@@ -386,7 +381,6 @@
}
private function getProjectHandle($phids,$project_phid) {
-
$handles = $this->loadViewerHandles($phids);
$project_handle = $handles[$project_phid];
return $project_handle;
--
To view, visit https://gerrit.wikimedia.org/r/169605
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibad189b45c0cd379ea61ae4a78d0c8a094159e37
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/Sprint
Gerrit-Branch: master
Gerrit-Owner: Christopher Johnson (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits