print("$bugsperperson{$person} bugs and features");
print("$bugsperperson{$person} bugs and features");
print("</A>");
print("</A>");
print(" for \n");
print(" for \n");
print("<A HREF=\"mailto:$login_name\">");
print("<A HREF=\"mailto:$login_name\">");
print("$login_name");
print("$login_name");
print("</A>\n");
print("</A>\n");
print("</TD></TR>\n\n");
print("</TD></TR>\n\n");
}
}
print"</TABLE>\n";
}
}
}
print"</TABLE>\n";
}
sub most_recently_doomed{
my$when=localtime(time);
my$ms="M".Param("curmilestone");
my$quip="Summary";
print"<center>\n<h1>";
if($FORM{'product'}ne"-All-"){
print"Most Recently Doomed ($FORM{'product'})";
}else{
print"Most Recently Doomed";
}
print"</h1>\n$when<p>\n";
sub most_recently_doomed
#########################
{
# start painting report #
my$when=localtime(time);
#########################
my$ms="M".Param("curmilestone");
my$quip="Summary";
print"<center>\n<h1>";
if($FORM{'quip'}){
if($::FORM{'product'}ne"-All-"){
if(open(COMMENTS,"<data/comments")){
print"Most Recently Doomed ($::FORM{'product'})";
my@cdata;
}else{
while(<COMMENTS>){
print"Most Recently Doomed";
push@cdata,$_;
}
}
print"</h1>\n$when<p>\n";
closeCOMMENTS;
$quip="<i>".$cdata[int(rand($#cdata+1))]."</i>";
#########################
}
# start painting report #
}
#########################
if($::FORM{'quip'})
{
if(open(COMMENTS,"<data/comments"))
{
my@cdata;
while(<COMMENTS>)
{
push@cdata,$_;
}
closeCOMMENTS;
$quip="<i>".$cdata[int(rand($#cdata+1))]."</i>";}
}
# Build up $query string
# Build up $query string
my$query;
my$query="select distinct assigned_to from bugs where bugs.bug_status='NEW' and target_milestone='' and bug_severity!='enhancement' and status_whiteboard='' and (product='Browser' or product='MailNews')";
$query="select distinct assigned_to from bugs where bugs.bug_status='NEW' and target_milestone='' and bug_severity!='enhancement' and status_whiteboard='' and (product='Browser' or product='MailNews')";
my$query="select count(bug_id) from bugs,profiles where bugs.bug_status='NEW' and userid=assigned_to and userid='$person' and target_milestone='' and bug_severity!='enhancement' and status_whiteboard='' and (product='Browser' or product='MailNews')";
my$query="select count(bug_id) from bugs,profiles where bugs.bug_status='NEW' and userid=assigned_to and userid='$person' and target_milestone='' and bug_severity!='enhancement' and status_whiteboard='' and (product='Browser' or product='MailNews')";
if($FORM{'product'}ne"-All-"){
if($::FORM{'product'}ne"-All-"){
$query.="and bugs.product='$FORM{'product'}'";
$query.="and bugs.product='$::FORM{'product'}'";
}
}
SendSQL($query);
SendSQL($query);
my$bugcount=FetchSQLData();
my$bugcount=FetchSQLData();
$bugsperperson{$person}=$bugcount;
$bugsperperson{$person}=$bugcount;
$bugtotal+=$bugcount;
$bugtotal+=$bugcount;
}
}
# sort people by the number of bugs they have assigned to this milestone
# sort people by the number of bugs they have assigned to this milestone
@people=sortbybugs@people;
@people=sortbybugs@people;
my$totalpeople=@people;
my$totalpeople=@people;
if($totalpeople>20){
if($totalpeople>20){
splice@people,0,$totalpeople-20;
splice@people,0,$totalpeople-20;
}
}
print"<TABLE>\n";
print"<TABLE>\n";
print"<TR><TD COLSPAN=2>\n";
print"<TR><TD COLSPAN=2>\n";
print"$totalpeople engineers have $bugtotal untouched new bugs.\n";
print"$totalpeople engineers have $bugtotal untouched new bugs.\n";
if($totalpeople>20){
if($totalpeople>20){
print"These are the 20 most doomed.";
print"These are the 20 most doomed.";
}
}
print"</TD></TR>\n";
print"</TD></TR>\n";
while(@people)
while(@people){
{
$person=pop@people;
$person=pop@people;
print"<TR><TD>\n";
print"<TR><TD>\n";
SendSQL("select login_name from profiles where userid=$person");
SendSQL("select login_name from profiles where userid=$person");