summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Search.pm21
-rw-r--r--template/en/default/search/form.html.tmpl2
2 files changed, 21 insertions, 2 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 = @_;
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index ec0d2a90b..2e2ae73d6 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -301,7 +301,7 @@ function doOnSelectProduct(selectmode) {
<td>
[% INCLUDE "search/type-select.html.tmpl"
name = "keywords_type",
- types = ['allwords', 'anywords', 'nowords'],
+ types = ['allwords', 'anywords', 'nowords', 'regexp', 'notregexp'],
selected = default.keywords_type.0 %]
</td>
<td>