cvs: pearweb / package.php package.xml /include/bugs pear-bugs.php /public_html package-info.php /public_html/bugs search.php
| From: | Greg Beaver | Date: | Sun, 03 Dec 2006 05:30:08 +0000 |
| Subject: | cvs: pearweb / package.php package.xml /include/bugs pear-bugs.php /public_html package-info.php /public_html/bugs search.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5235@lists.php.net to get a copy of this message | ||
cellog Sun Dec 3 05:30:08 2006 UTC
Added files:
/pearweb/include/bugs pear-bugs.php
Modified files:
/pearweb package.php package.xml
/pearweb/public_html/bugs search.php
/pearweb/public_html package-info.php
Log:
* add bug summary statistics to package homepages, clearly showing
packages with little or no attention to bugs
http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.36&r2=1.37&diff_format=u Index: pearweb/package.php diff -u pearweb/package.php:1.36 pearweb/package.php:1.37 --- pearweb/package.php:1.36 Fri Dec 1 21:19:08 2006 +++ pearweb/package.php Sun Dec 3 05:30:07 2006 @@ -44,6 +44,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs '); $a->resetUsesrole(); $a->addUsesRole('web', 'Role_Web', 'pearified.com'); http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.66&r2=1.67&diff_format=u Index: pearweb/package.xml diff -u pearweb/package.xml:1.66 pearweb/package.xml:1.67 --- pearweb/package.xml:1.66 Fri Dec 1 21:19:08 2006 +++ pearweb/package.xml Sun Dec 3 05:30:07 2006 @@ -52,8 +52,8 @@ <email>dufuz@php.net</email> <active>no</active> </developer> - <date>2006-12-01</date> - <time>16:06:34</time> + <date>2006-12-03</date> + <time>00:29:45</time> <version> <release>1.0.0</release> <api>0.1.1</api> @@ -81,6 +81,8 @@ * fix Bug #9405: add back button to info.php * fix Bug #9476: schema validation error on postinstall script * fix Bug #9483: registering for voter account "enter intended purpose" + * fix Bug #9526: if date is next year, election interface won't + properly save new election * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow @@ -88,6 +90,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -922,7 +926,7 @@ <release>stable</release> <api>stable</api> </stability> - <date>2006-12-01</date> + <date>2006-12-03</date> <license uri="http://www.php.net/license">PHP License</license> <notes> * fix REST generation for deprecated packages/channels @@ -942,6 +946,8 @@ * fix Bug #9405: add back button to info.php * fix Bug #9476: schema validation error on postinstall script * fix Bug #9483: registering for voter account "enter intended purpose" + * fix Bug #9526: if date is next year, election interface won't + properly save new election * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow @@ -949,6 +955,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/search.php?r1=1.74&r2=1.75&diff_format=u Index: pearweb/public_html/bugs/search.php diff -u pearweb/public_html/bugs/search.php:1.74 pearweb/public_html/bugs/search.php:1.75 --- pearweb/public_html/bugs/search.php:1.74 Wed Sep 27 04:27:21 2006 +++ pearweb/public_html/bugs/search.php Sun Dec 3 05:30:07 2006 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: search.php,v 1.74 2006/09/27 04:27:21 cellog Exp $ + * @version $Id: search.php,v 1.75 2006/12/03 05:30:07 cellog Exp $ */ /** @@ -175,6 +175,10 @@ default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified')"; + case 'OpenFeedback': + default: + $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . + " 'Analyzed', 'Critical', 'Verified', 'Feedback')"; } if (empty($_GET['search_for'])) { http://cvs.php.net/viewvc.cgi/pearweb/public_html/package-info.php?r1=1.121&r2=1.122&diff_format=u Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.121 pearweb/public_html/package-info.php:1.122 --- pearweb/public_html/package-info.php:1.121 Thu Oct 19 01:33:21 2006 +++ pearweb/public_html/package-info.php Sun Dec 3 05:30:08 2006 @@ -16,12 +16,13 @@ | Authors: Martin Jansen <mj@php.net> | | Tomas V.V.Cox <cox@idecnet.com> | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.121 2006/10/19 01:33:21 cellog Exp $ + $Id: package-info.php,v 1.122 2006/12/03 05:30:08 cellog Exp $ */ require_once 'Damblan/Karma.php'; require_once 'Damblan/URL.php'; +require_once 'bugs/pear-bugs.php'; $site = new Damblan_URL; @@ -263,10 +264,11 @@ print '</tr>'; print '<tr>'; - print '<th colspan="2" class="headrow">» Current Release</th>'; + print '<th width="50%" class="headrow">» Current Release</th>'; + print '<th width="50%" class="headrow">» Bug Summary</th>'; print '</tr>'; print '<tr>'; - print '<td colspan="2" class="textcell">'; + print '<td width="50%" class="textcell">'; if (isset($versions[0])) { print '<a href="http://download.pear.php.net/package/' . htmlspecialchars($name) . '-' . $versions[0] . '.tgz">' . $versions[0] . '</a>'; print ' (' . $pkg['releases'][$versions[0]]['state'] . ')'; @@ -293,8 +295,31 @@ print 'No releases have been made yet.'; } print '</td>'; + print '<td width="50%" class="textcell">'; + $bugs = new PEAR_Bugs; + $buginfo = $bugs->packageBugStats($pkg['name']); + if (!$buginfo['count']) { + print 'No open bugs'; + } else { + print '<ul>'; + $bstats = $bugs->bugRank(); + foreach ($bstats as $i => $pi) { + if ($pi['name'] == $pkg['name']) { + print '<li>Package Maintenance Rank: <strong>' . ++$i . '</strong> of ' . + count ($bstats) . + ' packages with open bugs</li>'; + break; + } + } + print '<li>Number of <a href="/bugs/search.php?cmd=display&package_name[]=' . + $pkg['name'] . '&status=OpenFeedback&bug_type=Bugs">open bugs</a>: <strong>' . + $buginfo['count'] . '</strong></li>'; + print '<li>Average age of open bugs: <strong>' . round($buginfo['average']) . ' days</strong></li>'; + print '<li>Oldest open bug: <strong>' . $buginfo['oldest'] . ' days</strong></li>'; + print '</ul>'; + } + print '</td>'; print '</tr>'; - print '<tr>'; print '<th colspan="2" class="headrow">» Description</th>'; print '</tr>'; http://cvs.php.net/viewvc.cgi/pearweb/include/bugs/pear-bugs.php?view=markup&rev=1.1 Index: pearweb/include/bugs/pear-bugs.php +++ pearweb/include/bugs/pear-bugs.php <?php /** * Bug statistics * @package pearweb */ class PEAR_Bugs { var $_dbh; function PEAR_Bugs() { $this->_dbh = $GLOBALS['dbh']; } function packageBugStats($packageid) { $info = $this->_dbh->getAll(' SELECT COUNT(bugdb.id) as count, AVG(TO_DAYS(NOW()) - TO_DAYS(ts1)) as average, MAX(TO_DAYS(NOW()) - TO_DAYS(ts1)) as oldest FROM bugdb, packages WHERE name=? AND bugdb.package_name = packages.name AND status IN ("Open","Feedback","Assigned","Analyzed","Verified","Critical") AND bug_type IN ("Bug","Documentation Problem") ', array($packageid), DB_FETCHMODE_ASSOC); return $info[0]; } function bugRank() { $info = $this->_dbh->getAll(' SELECT name, AVG(TO_DAYS(NOW()) - TO_DAYS(ts1)) as average FROM bugdb, packages WHERE bugdb.package_name = packages.name AND status IN ("Open","Feedback","Assigned","Analyzed","Verified","Critical") AND bug_type IN ("Bug","Documentation Problem") AND package_type="pear" GROUP BY package_name ORDER BY average ASC ', array(), DB_FETCHMODE_ASSOC); return $info; } } ?>
http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.36&r2=1.37&diff_format=u Index: pearweb/package.php diff -u pearweb/package.php:1.36 pearweb/package.php:1.37 --- pearweb/package.php:1.36 Fri Dec 1 21:19:08 2006 +++ pearweb/package.php Sun Dec 3 05:30:07 2006 @@ -44,6 +44,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs '); $a->resetUsesrole(); $a->addUsesRole('web', 'Role_Web', 'pearified.com'); http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.66&r2=1.67&diff_format=u Index: pearweb/package.xml diff -u pearweb/package.xml:1.66 pearweb/package.xml:1.67 --- pearweb/package.xml:1.66 Fri Dec 1 21:19:08 2006 +++ pearweb/package.xml Sun Dec 3 05:30:07 2006 @@ -52,8 +52,8 @@ <email>dufuz@php.net</email> <active>no</active> </developer> - <date>2006-12-01</date> - <time>16:06:34</time> + <date>2006-12-03</date> + <time>00:29:45</time> <version> <release>1.0.0</release> <api>0.1.1</api> @@ -81,6 +81,8 @@ * fix Bug #9405: add back button to info.php * fix Bug #9476: schema validation error on postinstall script * fix Bug #9483: registering for voter account "enter intended purpose" + * fix Bug #9526: if date is next year, election interface won't + properly save new election * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow @@ -88,6 +90,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -922,7 +926,7 @@ <release>stable</release> <api>stable</api> </stability> - <date>2006-12-01</date> + <date>2006-12-03</date> <license uri="http://www.php.net/license">PHP License</license> <notes> * fix REST generation for deprecated packages/channels @@ -942,6 +946,8 @@ * fix Bug #9405: add back button to info.php * fix Bug #9476: schema validation error on postinstall script * fix Bug #9483: registering for voter account "enter intended purpose" + * fix Bug #9526: if date is next year, election interface won't + properly save new election * implement Request #7828: PEAR Bug Summary Report * implement Request #9118: Added new feature to pepr * completely rework account requests, both to simplify/clarify and to allow @@ -949,6 +955,8 @@ privileges * add missing PEPr tables to the MDB2 schema .xml file * add list of PEAR books in the support section + * add bug summary statistics to package homepages, clearly showing + packages with little or no attention to bugs </notes> </release> </changelog> http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/search.php?r1=1.74&r2=1.75&diff_format=u Index: pearweb/public_html/bugs/search.php diff -u pearweb/public_html/bugs/search.php:1.74 pearweb/public_html/bugs/search.php:1.75 --- pearweb/public_html/bugs/search.php:1.74 Wed Sep 27 04:27:21 2006 +++ pearweb/public_html/bugs/search.php Sun Dec 3 05:30:07 2006 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: search.php,v 1.74 2006/09/27 04:27:21 cellog Exp $ + * @version $Id: search.php,v 1.75 2006/12/03 05:30:07 cellog Exp $ */ /** @@ -175,6 +175,10 @@ default: $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . " 'Analyzed', 'Critical', 'Verified')"; + case 'OpenFeedback': + default: + $where_clause .= " AND bugdb.status IN ('Open', 'Assigned'," . + " 'Analyzed', 'Critical', 'Verified', 'Feedback')"; } if (empty($_GET['search_for'])) { http://cvs.php.net/viewvc.cgi/pearweb/public_html/package-info.php?r1=1.121&r2=1.122&diff_format=u Index: pearweb/public_html/package-info.php diff -u pearweb/public_html/package-info.php:1.121 pearweb/public_html/package-info.php:1.122 --- pearweb/public_html/package-info.php:1.121 Thu Oct 19 01:33:21 2006 +++ pearweb/public_html/package-info.php Sun Dec 3 05:30:08 2006 @@ -16,12 +16,13 @@ | Authors: Martin Jansen <mj@php.net> | | Tomas V.V.Cox <cox@idecnet.com> | +----------------------------------------------------------------------+ - $Id: package-info.php,v 1.121 2006/10/19 01:33:21 cellog Exp $ + $Id: package-info.php,v 1.122 2006/12/03 05:30:08 cellog Exp $ */ require_once 'Damblan/Karma.php'; require_once 'Damblan/URL.php'; +require_once 'bugs/pear-bugs.php'; $site = new Damblan_URL; @@ -263,10 +264,11 @@ print '</tr>'; print '<tr>'; - print '<th colspan="2" class="headrow">» Current Release</th>'; + print '<th width="50%" class="headrow">» Current Release</th>'; + print '<th width="50%" class="headrow">» Bug Summary</th>'; print '</tr>'; print '<tr>'; - print '<td colspan="2" class="textcell">'; + print '<td width="50%" class="textcell">'; if (isset($versions[0])) { print '<a href="http://download.pear.php.net/package/' . htmlspecialchars($name) . '-' . $versions[0] . '.tgz">' . $versions[0] . '</a>'; print ' (' . $pkg['releases'][$versions[0]]['state'] . ')'; @@ -293,8 +295,31 @@ print 'No releases have been made yet.'; } print '</td>'; + print '<td width="50%" class="textcell">'; + $bugs = new PEAR_Bugs; + $buginfo = $bugs->packageBugStats($pkg['name']); + if (!$buginfo['count']) { + print 'No open bugs'; + } else { + print '<ul>'; + $bstats = $bugs->bugRank(); + foreach ($bstats as $i => $pi) { + if ($pi['name'] == $pkg['name']) { + print '<li>Package Maintenance Rank: <strong>' . ++$i . '</strong> of ' . + count ($bstats) . + ' packages with open bugs</li>'; + break; + } + } + print '<li>Number of <a href="/bugs/search.php?cmd=display&package_name[]=' . + $pkg['name'] . '&status=OpenFeedback&bug_type=Bugs">open bugs</a>: <strong>' . + $buginfo['count'] . '</strong></li>'; + print '<li>Average age of open bugs: <strong>' . round($buginfo['average']) . ' days</strong></li>'; + print '<li>Oldest open bug: <strong>' . $buginfo['oldest'] . ' days</strong></li>'; + print '</ul>'; + } + print '</td>'; print '</tr>'; - print '<tr>'; print '<th colspan="2" class="headrow">» Description</th>'; print '</tr>'; http://cvs.php.net/viewvc.cgi/pearweb/include/bugs/pear-bugs.php?view=markup&rev=1.1 Index: pearweb/include/bugs/pear-bugs.php +++ pearweb/include/bugs/pear-bugs.php <?php /** * Bug statistics * @package pearweb */ class PEAR_Bugs { var $_dbh; function PEAR_Bugs() { $this->_dbh = $GLOBALS['dbh']; } function packageBugStats($packageid) { $info = $this->_dbh->getAll(' SELECT COUNT(bugdb.id) as count, AVG(TO_DAYS(NOW()) - TO_DAYS(ts1)) as average, MAX(TO_DAYS(NOW()) - TO_DAYS(ts1)) as oldest FROM bugdb, packages WHERE name=? AND bugdb.package_name = packages.name AND status IN ("Open","Feedback","Assigned","Analyzed","Verified","Critical") AND bug_type IN ("Bug","Documentation Problem") ', array($packageid), DB_FETCHMODE_ASSOC); return $info[0]; } function bugRank() { $info = $this->_dbh->getAll(' SELECT name, AVG(TO_DAYS(NOW()) - TO_DAYS(ts1)) as average FROM bugdb, packages WHERE bugdb.package_name = packages.name AND status IN ("Open","Feedback","Assigned","Analyzed","Verified","Critical") AND bug_type IN ("Bug","Documentation Problem") AND package_type="pear" GROUP BY package_name ORDER BY average ASC ', array(), DB_FETCHMODE_ASSOC); return $info; } } ?>