cvs: pearweb / package.php package.xml /include/bugs pear-bugs.php
| From: | Greg Beaver | Date: | Sat, 16 Dec 2006 05:54:26 +0000 |
| Subject: | cvs: pearweb / package.php package.xml /include/bugs pear-bugs.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5274@lists.php.net to get a copy of this message | ||
cellog Sat Dec 16 05:54:26 2006 UTC
Modified files:
/pearweb/include/bugs pear-bugs.php
/pearweb package.php package.xml
Log:
* add statistics for developers' bug activity
This new feature allows the most active developers who are closing bugs
to get a special ranking based on closed bugs assigned to a developer.
The idea is to encourage greater bug fixing and also accountability
http://cvs.php.net/viewvc.cgi/pearweb/include/bugs/pear-bugs.php?r1=1.1&r2=1.2&diff_format=u
Index: pearweb/include/bugs/pear-bugs.php
diff -u pearweb/include/bugs/pear-bugs.php:1.1 pearweb/include/bugs/pear-bugs.php:1.2
--- pearweb/include/bugs/pear-bugs.php:1.1 Sun Dec 3 05:30:08 2006
+++ pearweb/include/bugs/pear-bugs.php Sat Dec 16 05:54:26 2006
@@ -45,5 +45,118 @@
', array(), DB_FETCHMODE_ASSOC);
return $info;
}
+
+ function developerBugStats($handle)
+ {
+ $allbugs = $this->_dbh->getAssoc('SELECT b.status, COUNT(b.status) as c
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ m.handle = ? AND
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type \!= "Feature/Change Request"
+ GROUP BY b.status;', false, array($handle));
+ $total = 0;
+ foreach ($allbugs as $buginfo)
+ {
+ $total += $buginfo;
+ }
+ $assigned = $this->_dbh->getOne('SELECT COUNT(b.status)
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ m.handle = ? AND
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type \!= "Feature/Change Request" AND
+ b.assign = ?', array($handle, $handle));
+ $openage = $this->_dbh->getOne('SELECT ROUND(AVG(TO_DAYS(NOW()) -
TO_DAYS(b.ts1)))
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ m.handle = ? AND
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type \!= "Feature/Change Request" AND
+ b.status IN ("Assigned", "Analyzed", "Feedback",
"Open", "Critical", "Verified") AND
+ b.assign = ?', array($handle, $handle));
+ $opencount = $this->_dbh->getOne('SELECT COUNT(*)
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ m.handle = ? AND
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type \!= "Feature/Change Request" AND
+ b.status IN ("Assigned", "Analyzed", "Feedback",
"Open", "Critical", "Verified") AND
+ b.assign = ?', array($handle, $handle));
+ $bugrank = $this->_dbh->getAll('SELECT COUNT(*) as c, m.handle
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type != "Feature/Change Request" AND
+ b.assign = m.handle AND
+ b.status = "Closed"
+ GROUP BY m.handle
+ ORDER BY c DESC, b.ts1 DESC', array(), DB_FETCHMODE_ASSOC);
+ $rank = count($bugrank) + 1;
+ $alltimecount = 0;
+ foreach ($bugrank as $i => $inf) {
+ if ($inf['handle'] == $handle) {
+ $rank = $i + 1;
+ $alltimecount = $inf['c'];
+ break;
+ }
+ }
+ return array(
+ 'total' => $total,
+ 'assigned' => $assigned / $total,
+ 'openage' => $openage,
+ 'opencount' => $opencount,
+ 'info' => $allbugs,
+ 'rankings' => $bugrank,
+ 'rank' => $rank,
+ 'alltime' => $alltimecount,
+ );
+ }
+
+ function getRank($handle)
+ {
+ static $bugrank = false;
+ if (!$bugrank) {
+ $bugrank = $this->_dbh->getAll('SELECT COUNT(*) as c, m.handle
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type != "Feature/Change Request" AND
+ b.assign = m.handle AND
+ b.status = "Closed"
+ GROUP BY m.handle
+ ORDER BY c DESC, b.ts1 DESC', array(), DB_FETCHMODE_ASSOC);
+ }
+ $rank = count($bugrank) + 1;
+ $alltimecount = 0;
+ foreach ($bugrank as $i => $inf) {
+ if ($inf['handle'] == $handle) {
+ $rank = $i + 1;
+ $alltimecount = $inf['c'];
+ break;
+ }
+ }
+ return array($rank, count($bugrank) + 1);
+ }
+
+ function allDevelStats()
+ {
+ return $this->_dbh->getAll('SELECT COUNT(*) as c, m.handle
+ FROM bugdb b, maintains m, packages p
+ WHERE
+ p.id = m.package AND
+ b.package_name = p.name AND
+ b.bug_type != "Feature/Change Request" AND
+ b.assign = m.handle AND
+ b.status = "Closed"
+ GROUP BY m.handle
+ ORDER BY c DESC', array(), DB_FETCHMODE_ASSOC);
+ }
}
?>
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pearweb/package.php?r1=1.39&r2=1.40&diff_format=u
Index: pearweb/package.php
diff -u pearweb/package.php:1.39 pearweb/package.php:1.40
--- pearweb/package.php:1.39 Wed Dec 13 18:32:23 2006
+++ pearweb/package.php Sat Dec 16 05:54:26 2006
@@ -14,11 +14,11 @@
'tests/',
),
));
-$a->setReleaseVersion('1.0.1');
+$a->setReleaseVersion('1.1.0');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
- * hide emails of developers in maps who request it
+ * add statistics for developers\' bug activity
');
$a->resetUsesrole();
$a->addUsesRole('web', 'Role_Web', 'pearified.com');
http://cvs.php.net/viewvc.cgi/pearweb/package.xml?r1=1.72&r2=1.73&diff_format=u
Index: pearweb/package.xml
diff -u pearweb/package.xml:1.72 pearweb/package.xml:1.73
--- pearweb/package.xml:1.72 Wed Dec 13 18:32:23 2006
+++ pearweb/package.xml Sat Dec 16 05:54:26 2006
@@ -52,10 +52,10 @@
<email>dufuz@php.net</email>
<active>no</active>
</developer>
- <date>2006-12-13</date>
- <time>12:29:14</time>
+ <date>2006-12-15</date>
+ <time>23:53:01</time>
<version>
- <release>1.0.1</release>
+ <release>1.1.0</release>
<api>0.1.1</api>
</version>
<stability>
@@ -64,7 +64,7 @@
</stability>
<license uri="http://www.php.net/license">PHP
License</license>
<notes>
- * hide emails of developers in maps who request it
+ * add statistics for developers' bug activity
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -960,8 +960,21 @@
</stability>
<date>2006-12-13</date>
<license uri="http://www.php.net/license">PHP
License</license>
+ <notes>* hide emails of developers in maps who request it</notes>
+ </release>
+ <release>
+ <version>
+ <release>1.1.0</release>
+ <api>0.1.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2006-12-15</date>
+ <license uri="http://www.php.net/license">PHP
License</license>
<notes>
- * hide emails of developers in maps who request it
+ * add statistics for developers' bug activity
</notes>
</release>
</changelog>