Beispiel #1
0
 function percentDone($package, $next = false)
 {
     if (!$next) {
         list($next, ) = Roadmap_Info::nextRelease($package);
     }
     $sql = '
         SELECT bugdb.status, COUNT(bugdb.id)
         FROM bugdb_roadmap_link b_r_l, bugdb_roadmap b_r, bugdb
         WHERE
             b_r.roadmap_version = ? AND
             b_r.package = ? AND
             b_r_l.roadmap_id = b_r.id AND
             bugdb.id = b_r_l.id
         GROUP BY bugdb.status';
     $count = $GLOBALS['dbh']->getAssoc($sql, false, array($next, $package));
     $total = $closed = 0;
     $s = array('Closed', 'Duplicate', 'Bogus', "Won't Fix");
     foreach ($count as $status => $amount) {
         if (in_array($status, $s)) {
             $closed = $amount;
         }
         $total += $amount;
     }
     if (!$total) {
         return 0;
     }
     return round(100 * $closed / $total);
 }
Beispiel #2
0
     echo 'No releases have been made yet.';
 }
 if (empty($pkg['bug_link']) && Roadmap_Info::roadmapExists($name)) {
     echo '<br /><a href="/bugs/roadmap.php?package=' . urlencode($name) . '">Development Roadmap</a>';
     $nextrelease = Roadmap_Info::nextRelease($name);
     if ($nextrelease) {
         $x = ceil((strtotime($nextrelease[1]) - time()) / 60 / 60 / 24);
         echo ' (next release: <strong><a href="/bugs/roadmap.php?package=' . urlencode($name) . '&amp;roadmapdetail=' . $nextrelease[0] . '#a' . $nextrelease[0] . '">' . $nextrelease[0] . '</a></strong> in ';
         echo $x . ' day';
         if ($x != 1) {
             echo 's';
         }
         if ($x < 0) {
             echo '!!';
         }
         echo ', ' . Roadmap_Info::percentDone($name) . '% complete)';
     }
 }
 echo '</td>' . "\n";
 echo '<td>' . "\n";
 if (empty($pkg['bug_link'])) {
     $bugs = new PEAR_Bugs();
     $buginfo = $bugs->packageBugStats($pkg['name']);
     $frinfo = $bugs->packageFeaturestats($pkg['name']);
     if (!$buginfo['count']) {
         echo 'No open bugs';
     }
     if ($buginfo['count'] || $frinfo['count']) {
         echo '<ul>';
     }
     if ($buginfo['count']) {
Beispiel #3
0
     exit;
 }
 $roadmap->package = $_GET['package'];
 $roadmap->roadmap_version = $_GET['roadmap'];
 if (!$roadmap->find()) {
     response_header('Error :: No roadmap found');
     report_error('Roadmap not found, cannot generate package.xml');
     response_footer();
     exit;
 }
 require 'roadmap/package-generator.php';
 $gen = new Roadmap_Package_Generator($_GET['package']);
 $xml = $gen->getRoadmapPackage($_GET['roadmap']);
 if (!$xml) {
     require 'roadmap/info.php';
     if (!Roadmap_Info::percentDone($_GET['package'], $_GET['roadmap'])) {
         $xml = 'Unable to generate package.xml, no bugs closed yet';
     } else {
         $xml = 'Unable to generate package.xml, problems detected, please report to
         ' . PEAR_WEBMASTER_EMAIL . '.';
         foreach ($gen->getErrors() as $error) {
             $xml .= '<br />' . htmlspecialchars($error['message']) . "<br />";
         }
     }
 }
 $savant = Bug_DataObject::getSavant();
 $savant->xml = $xml;
 $savant->package = $_GET['package'];
 $savant->roadmap = $_GET['roadmap'];
 $savant->display('roadmap_packagexml.php');
 exit;