summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-04-08 12:12:42 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-04-08 12:12:42 +0200
commit51bdc50c7ff7caab9c57a67d9cc168347e2d1a11 (patch)
tree9d9a0ea35e8bfeacdd71effba5a5c19642130a5e /Bugzilla/Search.pm
parentf73a86bf700c8b3e85be84966171cdc8527a204a (diff)
downloadbugzilla-51bdc50c7ff7caab9c57a67d9cc168347e2d1a11.tar.gz
bugzilla-51bdc50c7ff7caab9c57a67d9cc168347e2d1a11.tar.xz
Bug 69621: Remove the keyword cache (which is not updated on keyword rename/delete)
r/a=mkanat
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index a0d9718ec..6a9d05144 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -126,6 +126,8 @@ sub COLUMNS {
'flagtypes.name' => $dbh->sql_group_concat('DISTINCT '
. $dbh->sql_string_concat('flagtypes.name', 'flags.status'), "', '"),
+
+ 'keywords' => $dbh->sql_group_concat('DISTINCT keyworddefs.name', "', '"),
);
# Backward-compatibility for old field names. Goes new_name => old_name.
@@ -295,6 +297,11 @@ sub init {
push(@supptables, "LEFT JOIN flagtypes ON flagtypes.id = flags.type_id");
}
+ if (grep($_ eq 'keywords', @fields)) {
+ push(@supptables, "LEFT JOIN keywords ON keywords.bug_id = bugs.bug_id");
+ push(@supptables, "LEFT JOIN keyworddefs ON keyworddefs.id = keywords.keywordid");
+ }
+
# If the user has selected all of either status or resolution, change to
# selecting none. This is functionally equivalent, but quite a lot faster.
# Also, if the status is __open__ or __closed__, translate those
@@ -960,7 +967,7 @@ sub init {
# These fields never go into the GROUP BY (bug_id goes in
# explicitly, below).
next if (grep($_ eq $field, EMPTY_COLUMN,
- qw(bug_id actual_time percentage_complete flagtypes.name)));
+ qw(bug_id actual_time percentage_complete flagtypes.name keywords)));
my $col = COLUMNS->{$field}->{name};
push(@groupby, $col) if !grep($_ eq $col, @groupby);
}