Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3361398
D25901.1744028779.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
3 KB
Referenced Files
None
Subscribers
None
D25901.1744028779.diff
View Options
diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php
--- a/src/applications/maniphest/controller/ManiphestReportController.php
+++ b/src/applications/maniphest/controller/ManiphestReportController.php
@@ -72,6 +72,11 @@
}
/**
+ * Render the "Burnup Rate" on /maniphest/report/burn/.
+ *
+ * Ironically this is not called for the "Burndown" on /project/reports/$id/
+ * as that's handled by PhabricatorProjectReportsController instead.
+ *
* @return array<AphrontListFilterView, PHUIObjectBoxView>
*/
public function renderBurn() {
@@ -484,6 +489,14 @@
return array(array_keys($out), array_values($out));
}
+ /**
+ * @param $label string Time representation for the row, e.g. "Feb 29 2024",
+ * "All Time", "Week of May 10 2024", "Month To Date", etc.
+ * @param $info array<string,int> open|close; number of tasks in timespan
+ * @return array<string,string,string,PhutilSafeHTML> Row text label; number
+ * of open tasks as string; number of closed tasks as string;
+ * PhutilSafeHTML such as "<span class="red">+144</span>"
+ */
private function formatBurnRow($label, $info) {
$delta = $info['open'] - $info['close'];
$fmt = number_format($delta);
@@ -502,12 +515,20 @@
);
}
+ /**
+ * @return int 50
+ */
private function getAveragePriority() {
// TODO: This is sort of a hard-code for the default "normal" status.
// When reports are more powerful, this should be made more general.
return 50;
}
+ /**
+ * Render all table cells in the "Open Tasks" table on /maniphest/report/*.
+ *
+ * @return array<AphrontListFilterView,PHUIObjectBoxView>
+ */
public function renderOpenTasks() {
$request = $this->getRequest();
$viewer = $request->getUser();
@@ -792,7 +813,10 @@
/**
- * Load all the tasks that have been recently closed.
+ * Load all tasks that have been recently closed.
+ * This is used for the "Recently Closed" column on /maniphest/report/*.
+ *
+ * @return array<ManiphestTask|null>
*/
private function loadRecentlyClosedTasks() {
list($ignored, $window_epoch) = $this->getWindow();
@@ -845,11 +869,16 @@
}
/**
- * Parse the "Recently Means" filter into:
- *
+ * Parse the "Recently Means" filter on /maniphest/report/* into:
* - A string representation, like "12 AM 7 days ago" (default);
* - a locale-aware epoch representation; and
* - a possible error.
+ * This is used for the "Recently Closed" column on /maniphest/report/*.
+ *
+ * @return array<string,integer,string|null> "Recently Means" user input;
+ * Resulting epoch timeframe used to get "Recently Closed" numbers
+ * (when user input is invalid, it defaults to a week ago); "Invalid"
+ * if first parameter could not be parsed as an epoch, else null.
*/
private function getWindow() {
$request = $this->getRequest();
@@ -884,6 +913,13 @@
return array($window_str, $window_epoch, $error);
}
+ /**
+ * Render date of oldest open task per user or per project with a link.
+ * Used on /maniphest/report/user/ and /maniphest/report/project/ URIs.
+ *
+ * @return array<PhutilSafeHTML,int> HTML link markup and the timespan
+ * (as epoch) since task creation
+ */
private function renderOldest(array $tasks) {
assert_instances_of($tasks, 'ManiphestTask');
$oldest = null;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 7, 12:26 (1 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1225182
Default Alt Text
D25901.1744028779.diff (3 KB)
Attached To
Mode
D25901: ManiphestReportController: Add more PHPDoc coverage
Attached
Detach File
Event Timeline
Log In to Comment