summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
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);
}