aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-05-22 20:46:55 +0000
committerlpsolit%gmail.com <>2005-05-22 20:46:55 +0000
commit9e7eab5037ebe808f5344aa5376fbe65529c553d (patch)
tree3ba2258d2df9055bed34a15f12efa69ec625a564
parentca07b6eb4eba2aeda3ab057a09bea1ae92078af4 (diff)
downloadbugs-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar
bugs-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar.gz
bugs-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar.bz2
bugs-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar.xz
bugs-9e7eab5037ebe808f5344aa5376fbe65529c553d.zip
Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
-rw-r--r--Bugzilla/FlagType.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm
index d07bb0b65..fdf790e75 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);