You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.0 KiB

#!/usr/bin/perl
#
# $Id: bugrindex.pl,v 1.3 2006/01/23 21:39:30 ddoughty Exp $
#
# Source File: bugrindex.pl
# Get config
require 'bugsitecfg.pl';
&app_initialize;
print "Content-Type: text/html\n\n";
opendir(DIR, $dataroot);
print "<!-- $! -->\n";
# @rpts = grep { /rptdefect\./ && -f "$_" } readdir(DIR);
@rpts = readdir(DIR);
closedir DIR;
$cnt = 0;
print "<HTML>\n<BODY>\n<FONT SIZE=1>";
print "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=\" TARGET=\"rdetail\">New Report</A><BR>\n";
foreach $rpt (@rpts) {
if ($rpt =~ /rptdefect./) {
$cnt++;
&get_report($rpt);
($trash, $rno) = split(/\./, $rpt);
if ($REPORT{'status'} eq 'r') {
push @statusr, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'f') {
push @statusf, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'd') {
push @statusd, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'e') {
push @statuse, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'u') {
push @statusu, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'c') {
push @statusc, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} elsif ($REPORT{'status'} eq 'w') {
push @statusw, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
} else {
push @statuso, "<A href=\"$cgiurl/bugrdetail.pl?uid=$FORM{'uid'}&dbfile=$rpt\" TARGET=\"rdetail\">$rno</A> - $REPORT{'title'}<BR>&nbsp;<BR>";
}
}
}
@rpts = ();
if ($cnt > 0) {
print "<HR width=100%><B>Regression Test Deviations</B><BR>\n";
foreach $statusr (@statusr) { print "$statusr\n"; }
print "<HR width=100%><B>Open</B><BR>\n";
foreach $statuso (@statuso) { print "$statuso\n"; }
print "<HR width=100%><B>Under Review</B><BR>\n";
foreach $statusu (@statusu) { print "$statusu\n"; }
print "<HR width=100%><B>Work Around</B><BR>\n";
foreach $statusw (@statusw) { print "$statusw\n"; }
print "<HR width=100%><B>Enhancements</B><BR>\n";
foreach $statuse (@statuse) { print "$statuse\n"; }
print "<HR width=100%><B>Fixed</B><BR>\n";
foreach $statusf (@statusf) { print "$statusf\n"; }
print "<HR width=100%><B>Design Issues</B><BR>\n";
foreach $statusd (@statusd) { print "$statusd\n"; }
print "<HR width=100%><B>Closed</B><BR>\n";
foreach $statusc (@statusc) { print "$statusc\n"; }
print "<HR width=100%>\n";
} else {
print "No reports.<BR>\n";
}
print "</FONT></BODY>\n</HTML>\n";