#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/
214 Hakan Kuecuekyilmaz 2008-06-30
Added "Bugs changed their status in the last 7 days" view.
I hope that Kevin is happy now :)
modified:
falcon_bug_statistic/falcon_bug_statistic.php
falcon_bug_statistic/falcon_bug_statistic_text.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-06-30 13:21:56 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic.php 2008-06-30 18:05:11 +0000
@@ -179,7 +179,48 @@ require_once './include/fbs_query.php';
echo '</tr>' . "\n";
?>
+ </table>
+
+ <br />
+ <br />
+
+ <table style="width: 90%;">
+ <tr>
+ <td colspan="4"><h2>Bugs changed their status in the last 7
days</h2></td>
+ </tr>
+ <tr>
+ <td><h2>Id</h2></td>
+ <td><h2>Priority</h2></td>
+ <td><h2>Status</h2></td>
+ <td><h2>Synopsis and change</h2></td>
+ </tr>
+ <?php
+ $i = 0;
+ $sum = 0;
+ while ($row = mysql_fetch_assoc($res_last_seven_status_change)) {
+ $i++;
+ $url = sprintf('http://bugs.mysql.com/%d', $row[id]);
+
+ if ($i % 2) {
+ echo '<tr class="even">' . "\n";
+ } else {
+ echo '<tr class="odd">' . "\n";
+ }
+ echo ' <td><a href="' . $url . '">' . $row['id'] .
'</a></td>' . "\n";
+ echo ' <td>' . $row['priority'] . '</td>' . "\n";
+ echo ' <td>' . $row['status'] . '</td>' . "\n";
+ echo ' <td>' . $row['synopsis'] . '<br />' .
nl2br($row['entry']) . '</td>' . "\n";
+ echo '</tr>' . "\n";
+ }
+ echo '<tr>' . "\n";
+ echo ' <td><b>All</b></td>' . "\n";
+ echo ' <td> </td>' . "\n";
+ echo ' <td> </td>' . "\n";
+ echo ' <td><b>' . $i . '</b></td>' . "\n";
+ echo '</tr>' . "\n";
+
+ ?>
</table>
</div>
=== modified file 'falcon_bug_statistic/falcon_bug_statistic_text.php'
--- a/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-06-30 13:21:56 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-06-30 18:05:11 +0000
@@ -2,6 +2,9 @@
/**
* Bug statistic for MySQL/Falcon: text output.
*
+ * @Todo: Add a cronjob which outputs incoming bug count
+ * into a plain-text file.
+ *
* Hakan Kuecuekyilmaz, <hakan at mysql dot com>, 2008-06-24.
* $Id$
*/
@@ -114,10 +117,36 @@ while ($row = mysql_fetch_assoc($res_las
printf(I_HEADER . '| ' . P_HEADER . '| ' . S_HEADER . '| ' . D_HEADER . "\n",
$row['id'], $row['priority'], $row['status'], $sdesc);
+ echo $hr_ipsd;
+}
+echo $hr_ipsd;
+printf(I_HEADER . '| ' . P_HEADER . '| ' . S_HEADER . '| ' . D_HEADER . "\n",
+ 'All', '', '', $sum);
+
+echo "\n";
+echo "\n";
+
+/**
+ * Id | Priority | Status | Synopsis and change
+ */
+echo $hr_ipsd;
+printf(I_HEADER . '| ' . P_HEADER . '| ' . S_HEADER . '| ' . D_HEADER . "\n",
+ 'Id', 'Priority', 'Status', 'Synopsis and change');
+echo $hr_ipsd;
+
+$sum = 0;
+while ($row = mysql_fetch_assoc($res_last_seven_status_change)) {
+ $sum++;
+ $entry = $row['synopsis'] . $hre_ipsd . str_replace("\n", $hre_ipsd, $row['entry']);
+
+ printf(I_HEADER . '| ' . P_HEADER . '| ' . S_HEADER . '| ' . D_HEADER . "\n",
+ $row['id'], $row['priority'], $row['status'], $entry);
+ echo $hr_ipsd;
}
echo $hr_ipsd;
printf(I_HEADER . '| ' . P_HEADER . '| ' . S_HEADER . '| ' . D_HEADER . "\n",
'All', '', '', $sum);
echo "\n";
+
?>
=== modified file 'falcon_bug_statistic/include/fbs_query.php'
--- a/falcon_bug_statistic/include/fbs_query.php 2008-06-30 13:21:56 +0000
+++ b/falcon_bug_statistic/include/fbs_query.php 2008-06-30 18:05:11 +0000
@@ -64,8 +64,20 @@ $sql_last_seven = "SELECT id, priority,
WHERE bug_type = 'Server: Falcon'
AND ts1 > '$date_last_seven'";
+$sql_last_seven_status_change =
+ "SELECT a.id, a.priority, a.status, b.synopsis, b.entry
+ FROM bugdb AS a, bugdb_log AS b
+ WHERE
+ b.id = (SELECT bugdb_log.id FROM bugdb_log
+ WHERE bugdb_log.bug = a.id
+ ORDER BY bugdb_log.id DESC
+ LIMIT 1)
+ AND bug_type = 'Server: Falcon'
+ AND ts2 > '$date_last_seven'";
+
$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);
?>
| Thread |
|---|
| • bzr commit into mysql-falcon branch (hakan:214) | Hakan Kuecuekyilmaz | 30 Jun |