From 51bdc50c7ff7caab9c57a67d9cc168347e2d1a11 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 8 Apr 2010 12:12:42 +0200 Subject: Bug 69621: Remove the keyword cache (which is not updated on keyword rename/delete) r/a=mkanat --- Bugzilla/Search.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Search.pm') 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); } -- cgit v1.2.3-24-g4f1b