summaryrefslogtreecommitdiffstats
path: root/Bugzilla/FlagType.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/FlagType.pm')
-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);