From 61ddf0a32846fdf2607043d94af1a0a86b80f6fc Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Mon, 12 Aug 2002 12:42:42 +0000 Subject: Bug 43600 - Convert products/components to use ids instead of names. Initial attempt by jake@bugzilla.org, updated by me r=joel, preed --- reports.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'reports.cgi') diff --git a/reports.cgi b/reports.cgi index e04a9fd6d..ac77c89fd 100755 --- a/reports.cgi +++ b/reports.cgi @@ -263,6 +263,7 @@ $when
FIN
# Build up $query string
+ my $prod_table = ($FORM{'product'} ne "-All-") ? ", products" : "";
my $query;
$query = <";
if( $FORM{'product'} ne "-All-" ) {
- SendSQL("SELECT defaultmilestone FROM products WHERE product = " .
- SqlQuote($FORM{'product'}));
+ SendSQL("SELECT defaultmilestone FROM products WHERE id = $product_id");
$ms = FetchOneColumn();
print "Most Doomed for $ms ($FORM{'product'})";
} else {
@@ -661,7 +663,7 @@ sub most_doomed_for_milestone {
my $query;
$query = "select distinct assigned_to from bugs where target_milestone=\"$ms\"";
if ($FORM{'product'} ne "-All-" ) {
- $query .= "and bugs.product=".SqlQuote($FORM{'product'});
+ $query .= "and bugs.product_id=$product_id ";
}
$query .= <