From 6e18b637651c0e6a0f1ef2167337bfe2ceef7de9 Mon Sep 17 00:00:00 2001 From: "endico%mozilla.org" <> Date: Fri, 6 Aug 1999 03:02:20 +0000 Subject: Add a current milestone variable and a most doomed report that's like the ones chofmann posts listing engineers with Mx bugs by number of bugs. --- reports.cgi | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 4 deletions(-) (limited to 'reports.cgi') diff --git a/reports.cgi b/reports.cgi index b773ec269..a8de9f804 100755 --- a/reports.cgi +++ b/reports.cgi @@ -19,10 +19,11 @@ # # Contributor(s): Harrison Page , # Terry Weissman , -# Bryce Nesbitt -# Added -All- report, change "nobanner" to "banner" (it is strange to have a -# list with 2 positive and 1 negative choice), default links on, add show -# sql comment. +# Dawn Endico +# Bryce Nesbitt , +# Added -All- report, change "nobanner" to "banner" (it is strange to have a +# list with 2 positive and 1 negative choice), default links on, add show +# sql comment. use diagnostics; use strict; @@ -36,6 +37,7 @@ use vars @::legal_product; my $dir = "data/mining"; my $week = 60 * 60 * 24 * 7; my @status = qw (NEW ASSIGNED REOPENED); +my %bugsperperson; # while this looks odd/redundant, it allows us to name # functions differently than the value passed in @@ -43,6 +45,7 @@ my @status = qw (NEW ASSIGNED REOPENED); my %reports = ( "most_doomed" => \&most_doomed, + "most_doomed_for_milestone" => \&most_doomed_for_milestone, "show_chart" => \&show_chart, ); @@ -130,6 +133,7 @@ $product_popup @@ -506,3 +510,117 @@ FIN } +sub most_doomed_for_milestone + { + my $when = localtime (time); + my $ms = "M" . Param("curmilestone"); + my $quip = "Summary"; + + print "
\n

"; + if( $::FORM{'product'} ne "-All-" ) { + print "Most Doomed for $ms ($::FORM{'product'})"; + } else { + print "Most Doomed for $ms"; + } + 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 target_milestone=\"$ms\""; + if( $::FORM{'product'} ne "-All-" ) { + $query .= "and bugs.product='$::FORM{'product'}'"; + } + $query .= < $bugsperperson{$b} + } + @people = sort bybugs @people; + my $totalpeople = @people; + + print "\n"; + print "\n"; + + while (@people) + { + $person = pop @people; + print "\n\n"); + } + } + print "
\n"; + print "$totalpeople engineers have $bugtotal $ms bugs and features.\n"; + print "
\n"; + SendSQL("select login_name from profiles where userid=$person;"); + my $login_name= FetchSQLData(); + print("\n"); + print("$bugsperperson{$person} bugs and features"); + print(""); + print(" for \n"); + print(""); + print("$login_name"); + print("\n"); + print("\n"); + + $person = pop @people; + if ($person) { + SendSQL("select login_name from profiles where userid=$person;"); + my $login_name= FetchSQLData(); + print("\n"); + print("$bugsperperson{$person} bugs and features"); + print(""); + print(" for \n"); + print(""); + print("$login_name"); + print("\n"); + print("
\n"; + + } + + -- cgit v1.2.3-24-g4f1b