#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/
226 Hakan Kuecuekyilmaz 2008-07-03
Separated active and inactive bugs in a better way and
added a Status | Count view for inactive bugs.
modified:
falcon_bug_statistic/falcon_bug_statistic.php
falcon_bug_statistic/falcon_bug_statistic_text.php
falcon_bug_statistic/include/config.inc.php
falcon_bug_statistic/include/fbs_query.php
=== modified file 'falcon_bug_statistic/falcon_bug_statistic.php'
--- a/falcon_bug_statistic/falcon_bug_statistic.php 2008-07-02 08:57:48 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic.php 2008-07-02 22:58:48 +0000
@@ -31,7 +31,7 @@ require_once './include/fbs_query.php';
</div>
<div class="fbs" style="text-align: center;">
- <?php echo '<h2>' . THIS_DATE . '</h2>' . "\n"; ?>
+ <?php echo '<h3>' . THIS_DATE . '</h3>' . "\n"; ?>
</div>
<div class="fbs">
@@ -40,6 +40,9 @@ require_once './include/fbs_query.php';
<td style="border: none; vertical-align: top;">
<table>
<tr>
+ <td colspan="2">Active Falcon Bugs</td>
+ </tr>
+ <tr>
<td><h2>Priority</h2></td>
<td><h2>Count</h2></td>
</tr>
@@ -49,7 +52,7 @@ require_once './include/fbs_query.php';
while ($row = mysql_fetch_assoc($res_prio)) {
$i++;
$sum += $row['count'];
- $url = sprintf(URL, '-' . $row['priority'], $status_verified_url, '');
+ $url = sprintf(URL, '-' . $row['priority'], $status_active_url, '');
if ($i % 2) {
echo '<tr class="even">' . "\n";
@@ -61,7 +64,7 @@ require_once './include/fbs_query.php';
echo '</tr>' . "\n";
}
- $url = sprintf(URL, 'all', $status_verified_url, '');
+ $url = sprintf(URL, 'all', $status_active_url, '');
echo '<tr>' . "\n";
echo ' <td><a href="' . $url . '"><b>All</b></a></td>' . "\n";
echo ' <td><b>' . $sum . '</b></td>' . "\n";
@@ -69,9 +72,12 @@ require_once './include/fbs_query.php';
?>
</table></td>
- <td style="border: none; vertical-align: top;">
+ <td rowspan="2" style="border: none; vertical-align: top;">
<table>
<tr>
+ <td colspan="2">Active Falcon Bugs</td>
+ </tr>
+ <tr>
<td><h2>Status</h2></td>
<td><h2>Count</h2></td>
</tr>
@@ -93,7 +99,7 @@ require_once './include/fbs_query.php';
echo '</tr>' . "\n";
}
- $url = sprintf(URL, 'all', $status_all_url, '');
+ $url = sprintf(URL, 'all', $status_active_url, '');
echo '<tr>' . "\n";
echo ' <td><a href="' . $url . '"><b>All</b></a></td>' . "\n";
echo ' <td><b>' . $sum . '</b></td>' . "\n";
@@ -102,9 +108,12 @@ require_once './include/fbs_query.php';
?>
</table></td>
- <td style="border: none; vertical-align: top;">
+ <td rowspan="2" style="border: none; vertical-align: top;">
<table>
<tr>
+ <td colspan="3">Active Falcon Bugs</td>
+ </tr>
+ <tr>
<td><h2>Priority</h2></td>
<td><h2>Status</h2></td>
<td><h2>Count</h2></td>
@@ -128,7 +137,7 @@ require_once './include/fbs_query.php';
echo '</tr>' . "\n";
}
- $url = sprintf(URL, 'all', $status_all_url, '');
+ $url = sprintf(URL, 'all', $status_active_url, '');
echo '<tr>' . "\n";
echo ' <td><a href="' . $url . '"><b>All</b></a></td>' . "\n";
echo ' <td> </td>' . "\n";
@@ -138,6 +147,43 @@ require_once './include/fbs_query.php';
?>
</table></td>
</tr>
+
+ </tr>
+ <td style="border: none; vertical-align: top;">
+ <table>
+ <tr>
+ <td colspan="2">Inactive Falcon Bugs</td>
+ </tr>
+ <tr>
+ <td><h2>Status</h2></td>
+ <td><h2>Count</h2></td>
+ </tr>
+ <?php
+ $i = 0;
+ $sum = 0;
+ while ($row = mysql_fetch_assoc($res_stat_inactive)) {
+ $i++;
+ $sum += $row['count'];
+ $url = sprintf(URL, 'all', $row['status'], '');
+
+ if ($i % 2) {
+ echo '<tr class="even">' . "\n";
+ } else {
+ echo '<tr class="odd">' . "\n";
+ }
+ echo ' <td><a href="' . $url . '">' . $row['status'] . '</a></td>' . "\n";
+ echo ' <td>' . $row['count'] . '</td>' . "\n";
+ echo '</tr>' . "\n";
+ }
+
+ $url = sprintf(URL, 'all', $status_inactive_url, '');
+ echo '<tr>' . "\n";
+ echo ' <td><a href="' . $url . '"><b>All</b></a></td>' . "\n";
+ echo ' <td><b>' . $sum . '</b></td>' . "\n";
+ echo '</tr>' . "\n";
+ ?>
+ </table></td>
+ </tr>
</table>
<br />
=== modified file 'falcon_bug_statistic/falcon_bug_statistic_text.php'
--- a/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-07-02 08:57:48 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-07-02 22:58:48 +0000
@@ -107,6 +107,26 @@ echo "\n";
echo "\n";
/**
+ * Inactive Status | Count.
+ */
+echo $hr_sc;
+echo ' Inactive bugs.' . "\n";
+echo $hr_sc;
+printf(S_HEADER . '| ' . C_HEADER . "\n", 'Status', 'Count');
+echo $hr_sc;
+
+$sum = 0;
+while ($row = mysql_fetch_assoc($res_stat_inactive)) {
+ $sum += $row['count'];
+ printf(S_HEADER . '| ' . C_VALUE . "\n", $row['status'], $row['count']);
+}
+echo $hr_sc;
+printf(S_HEADER . '| ' . C_VALUE . "\n", 'All', $sum);
+
+echo "\n";
+echo "\n";
+
+/**
* Id | Priority | Status | Short description.
*/
echo 'Falcon related bugs, which were newly reported in the last seven days.' . "\n";
=== modified file 'falcon_bug_statistic/include/config.inc.php'
--- a/falcon_bug_statistic/include/config.inc.php 2008-07-02 13:38:53 +0000
+++ b/falcon_bug_statistic/include/config.inc.php 2008-07-02 22:58:48 +0000
@@ -47,43 +47,42 @@ define('THIS_DATE', date("F jS, Y - H:i:
/**
* Status fields used in queries.
*/
-$status_verified = "
- 'In progress',
- 'In review',
- 'Patch approved',
- 'Patch pending',
- 'Patch queued',
- 'Post-fix test fail',
- 'QA testing',
- 'QA review',
- 'Verified'
-";
-
-$tmp = explode(',', $status_verified);
-foreach ($tmp as $data) {
- $status_verified_url .= '&status[]=' . str_replace("'", '', trim($data));
-}
-
-$status_all = "
+$status_active = "
'Analyzing',
'Documenting',
'In progress',
'In review',
'Need Doc Info',
'Need Feedback',
+ 'No Feedback',
'Open',
'Patch approved',
'Patch pending',
'Patch queued',
'Post-fix test fail',
- 'QA testing',
'QA review',
+ 'QA testing',
'Verified'
";
-$tmp = explode(',', $status_all);
+$tmp = explode(',', $status_active);
+foreach ($tmp as $data) {
+ $status_active_url .= '&status[]=' . str_replace("'", '', trim($data));
+}
+
+$status_inactive = "
+ 'Can\'t repeat',
+ 'Closed',
+ 'Duplicate',
+ 'Not a Bug',
+ 'To be fixed later',
+ 'Unsupported',
+ 'Won\'t fix'
+";
+
+$tmp = explode(',', $status_inactive);
foreach ($tmp as $data) {
- $status_all_url .= '&status[]=' . str_replace("'", '', trim($data));
+ $status_inacative_url .= '&status[]=' . str_replace("'", '', trim($data));
}
/**
=== modified file 'falcon_bug_statistic/include/fbs_query.php'
--- a/falcon_bug_statistic/include/fbs_query.php 2008-07-02 13:38:53 +0000
+++ b/falcon_bug_statistic/include/fbs_query.php 2008-07-02 22:58:48 +0000
@@ -17,19 +17,19 @@ mysql_select_db(DATABASE_NAME);
// Sample data.
$sql_prio = "SELECT priority, count(*) AS count FROM bugdb
- WHERE status IN (" . $status_verified . ")
+ WHERE status IN ($status_active)
AND severity <> 4
AND bug_type = 'Server: Falcon'
GROUP BY priority";
$sql_stat = "SELECT status, count(*) AS count FROM bugdb
- WHERE status IN (". $status_all . ")
+ WHERE status IN ($status_active)
AND severity <> 4
AND bug_type = 'Server: Falcon'
GROUP BY status";
$sql_prio_stat = "SELECT priority, status, count(*) AS count FROM bugdb
- WHERE status IN (" . $status_all . ")
+ WHERE status IN ($status_active)
AND severity <> 4
AND bug_type = 'Server: Falcon'
GROUP BY priority, status";
@@ -54,15 +54,22 @@ $sql_developer_status =
"SELECT assign, status, count(*) AS count
FROM bugdb
WHERE assign IN ($developer_keys)
- AND status NOT IN ('Can\'t repeat', 'Closed', 'Duplicate', 'Not a Bug')
+ AND status IN ($status_active)
AND bug_type = 'Server: Falcon'
GROUP BY assign, status
ORDER BY assign DESC";
+$sql_stat_inactive =
+ "SELECT status, count(*) AS count FROM bugdb
+ WHERE status IN ($status_inactive)
+ AND bug_type = 'Server: Falcon'
+ GROUP BY status";
+
$res_prio = mysql_query($sql_prio);
$res_stat = mysql_query($sql_stat);
$res_prio_stat = mysql_query($sql_prio_stat);
$res_last_seven = mysql_query($sql_last_seven);
$res_last_seven_status_change = mysql_query($sql_last_seven_status_change);
$res_developer_status = mysql_query($sql_developer_status);
+$res_stat_inactive = mysql_query($sql_stat_inactive);
?>
| Thread |
|---|
| • bzr commit into mysql-falcon branch (hakan:226) | Hakan Kuecuekyilmaz | 3 Jul |