From 9e7eab5037ebe808f5344aa5376fbe65529c553d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 22 May 2005 20:46:55 +0000 Subject: [PATCH] =?utf8?q?Bug=20291539:=20Flags=20get=20duplicated=20if=20?= =?utf8?q?multiple=20inclusions=20apply=20-=20Patch=20by=20Fr=C3=A9d=C3=A9?= =?utf8?q?ric=20Buclin=20=20r=3Djoel=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/FlagType.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.47.3