From b2bf39b277bc6cc7598c71abdfe88c83b5bf026f Mon Sep 17 00:00:00 2001
From: apenwarr
Date: Tue, 26 Jul 2005 00:11:47 +0000
Subject: [PATCH] schedulator summary: don't show bugs outside the bounce
goals, but report how many of them there are total and per person so we don't
"forget" about them.
git-svn-id: file:///home/apenwarr/alumnit-svn/public/trunk@10247 6619c942-59fa-0310-bf43-a07aaa81d9ac
---
gracefultavi/macros/Sched.php | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/gracefultavi/macros/Sched.php b/gracefultavi/macros/Sched.php
index 6ce192b8..f15542fc 100644
--- a/gracefultavi/macros/Sched.php
+++ b/gracefultavi/macros/Sched.php
@@ -780,6 +780,8 @@ function sch_summary($fixfor, $unfixed_thres, $fixed_thres)
$dates = array();
$bugs = array();
+ $skipped = array();
+ $total_skipped = $total_unfixed = $total_fixed = 0;
while ($row = mysql_fetch_row($result))
{
@@ -793,12 +795,24 @@ function sch_summary($fixfor, $unfixed_thres, $fixed_thres)
# $nicedue = ereg_replace("-", " ", $due);
$nicedue = ereg_replace("(....)-(..)-(..)", "\\3", $due);
- $dates[$due] = $nicedue;
- if (( $resolved && $priority <= $fixed_thres) ||
- (!$resolved && $priority <= $unfixed_thres))
+ $important_unfixed = !$resolved && $priority <= $unfixed_thres;
+ $important_fixed = $resolved && $priority <= $fixed_thres;
+ if ($important_unfixed || $important_fixed)
+ {
+ if ($important_unfixed) $total_unfixed++;
+ if ($important_fixed) $total_fixed++;
$last_date = $due;
-
+ }
+ else
+ {
+ $total_skipped++;
+ $skipped[$person]++;
+ continue;
+ }
+
+ $dates[$due] = $nicedue;
+
$bugs[$person][$due][] = array
("task" => $task,
"subtask" => $subtask,
@@ -823,8 +837,9 @@ function sch_summary($fixfor, $unfixed_thres, $fixed_thres)
$ret .= "Schedulator Summary for '$fixfor'
\n";
$ret .= "Predicted Bounce: $last_date$next_str
\n";
$ret .= " (Bounce goals: " .
- "fix bugs up to priority $unfixed_thres; " .
- "verify bugs up to priority $fixed_thres.)
\n";
+ "fix $total_unfixed bugs up to priority $unfixed_thres; " .
+ "verify $total_fixed bugs up to priority $fixed_thres; " .
+ "$total_skipped more bugs not shown.)
\n";
$ret .= <<" .
- "$person";
+ "$person$skippy";
foreach ($date_list as $due)
{
$dateclass = sch_dateclass($due, $daystobounce);
--
2.11.4.GIT