\n";
+ if( $::FORM{'product'} ne "-All-" ) {
+ print "Most Recently Doomed ($::FORM{'product'})";
+ } else {
+ print "Most Recently Doomed";
+ }
+ print "
\n$when\n";
+
+ #########################
+ # start painting report #
+ #########################
+
+ if ($::FORM{'quip'})
+ {
+ if (open (COMMENTS, ")
+ {
+ push @cdata, $_;
+ }
+ close COMMENTS;
+ $quip = "" . $cdata[int(rand($#cdata + 1))] . ""; }
+ }
+
+
+ # Build up $query string
+ my $query;
+ $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')";
+ if( $::FORM{'product'} ne "-All-" ) {
+ $query .= "and bugs.product='$::FORM{'product'}'";
+ }
+
+# End build up $query string
+
+ SendSQL ($query);
+ my @people = ();
+ while (my ($person) = FetchSQLData())
+ {
+ push @people, $person;
+ }
+
+ #############################
+ # suck contents of database #
+ #############################
+ my $person = "";
+ my $bugtotal = 0;
+ foreach $person (@people)
+ {
+ 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-" ) {
+ $query .= "and bugs.product='$::FORM{'product'}'";
+ }
+ SendSQL ($query);
+ my $bugcount = FetchSQLData();
+ $bugsperperson{$person} = $bugcount;
+ $bugtotal += $bugcount;
+ }
+
+# sort people by the number of bugs they have assigned to this milestone
+ @people = sort bybugs @people;
+ my $totalpeople = @people;
+
+ print "\n";
+
+ }
--
cgit v1.2.1