From: lpsolit%gmail.com <> Date: Sun, 22 May 2005 20:46:55 +0000 (+0000) Subject: Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric... X-Git-Tag: bugzilla-2.20rc1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7eab5037ebe808f5344aa5376fbe65529c553d;p=thirdparty%2Fbugzilla.git Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric Buclin r=joel a=justdave --- diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index d07bb0b65f..fdf790e758 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -249,7 +249,9 @@ sub match { my @criteria = sqlify_criteria($criteria, \@tables); # Build the query, grouping the types if we are counting flags. - my $select_clause = "SELECT " . join(", ", @columns); + # DISTINCT is used in order to count flag types only once when + # they appear several times in the flaginclusions table. + my $select_clause = "SELECT DISTINCT " . join(", ", @columns); my $from_clause = "FROM " . join(" ", @tables); my $where_clause = "WHERE " . join(" AND ", @criteria);