summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorRémi Zara <remi_zara@mac.com>2010-02-08 01:03:09 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-08 01:03:09 +0100
commitc0f18c9d3dba1535c6fc943a92837ad4c453f8d2 (patch)
treedbbcb94ff549603bc9969c20e2c64e54797034ab /Bugzilla
parent7f85d8e57d72ce68752cbf78bc633f00ee8da29a (diff)
downloadbugzilla-c0f18c9d3dba1535c6fc943a92837ad4c453f8d2.tar.gz
bugzilla-c0f18c9d3dba1535c6fc943a92837ad4c453f8d2.tar.xz
Bug 58731: Make the keywords regexp boolean charts work
r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 88e44ac1d..35d7137e5 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -28,6 +28,7 @@
# Joel Peshkin <bugreport@peshkin.net>
# Lance Larsh <lance.larsh@oracle.com>
# Jesse Clark <jjclark1982@gmail.com>
+# Rémi Zara <remi_zara@mac.com>
use strict;
@@ -636,6 +637,7 @@ sub init {
"^component,(?!changed)" => \&_component_nonchanged,
"^product,(?!changed)" => \&_product_nonchanged,
"^classification,(?!changed)" => \&_classification_nonchanged,
+ "^keywords,(?:equals|notequals|anyexact|anyword|allwords|nowords)" => \&_keywords_exact,
"^keywords,(?!changed)" => \&_keywords_nonchanged,
"^dependson,(?!changed)" => \&_dependson_nonchanged,
"^blocked,(?!changed)" => \&_blocked_nonchanged,
@@ -1865,7 +1867,7 @@ sub _classification_nonchanged {
$$term);
}
-sub _keywords_nonchanged {
+sub _keywords_exact {
my $self = shift;
my %func_args = @_;
my ($chartid, $v, $ff, $f, $t, $term, $supptables) =
@@ -1904,6 +1906,23 @@ sub _keywords_nonchanged {
}
}
+sub _keywords_nonchanged {
+ my $self = shift;
+ my %func_args = @_;
+ my ($chartid, $v, $ff, $f, $t, $term, $supptables) =
+ @func_args{qw(chartid v ff f t term supptables)};
+
+ my $k_table = "keywords_$$chartid";
+ my $kd_table = "keyworddefs_$$chartid";
+
+ push(@$supptables, "LEFT JOIN keywords AS $k_table " .
+ "ON $k_table.bug_id = bugs.bug_id");
+ push(@$supptables, "LEFT JOIN keyworddefs AS $kd_table " .
+ "ON $kd_table.id = $k_table.keywordid");
+
+ $$f = "$kd_table.name";
+}
+
sub _dependson_nonchanged {
my $self = shift;
my %func_args = @_;