diff options
author | lpsolit%gmail.com <> | 2005-05-22 22:46:55 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-05-22 22:46:55 +0200 |
commit | 9e7eab5037ebe808f5344aa5376fbe65529c553d (patch) | |
tree | 3ba2258d2df9055bed34a15f12efa69ec625a564 | |
parent | ca07b6eb4eba2aeda3ab057a09bea1ae92078af4 (diff) | |
download | bugzilla-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar.gz bugzilla-9e7eab5037ebe808f5344aa5376fbe65529c553d.tar.xz |
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.pm | 4 |
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); |