summaryrefslogtreecommitdiffstats
path: root/extensions/BugmailFilter
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-09-09 08:06:45 +0200
committerByron Jones <glob@mozilla.com>2014-09-09 08:06:45 +0200
commit7f1e1ce62d7e178790f338c3ac447466bc67da88 (patch)
tree94f465c5343c909e8c06160058322704dd02ecf6 /extensions/BugmailFilter
parentadfbc673427a2a44371db5284dd0522e7abb4423 (diff)
downloadbugzilla-7f1e1ce62d7e178790f338c3ac447466bc67da88.tar.gz
bugzilla-7f1e1ce62d7e178790f338c3ac447466bc67da88.tar.xz
Bug 1054138: add the ability to filter on "fields containing the string"
Diffstat (limited to 'extensions/BugmailFilter')
-rw-r--r--extensions/BugmailFilter/lib/Filter.pm2
-rw-r--r--extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl4
2 files changed, 3 insertions, 3 deletions
diff --git a/extensions/BugmailFilter/lib/Filter.pm b/extensions/BugmailFilter/lib/Filter.pm
index 5e83bd52a..a20f472d5 100644
--- a/extensions/BugmailFilter/lib/Filter.pm
+++ b/extensions/BugmailFilter/lib/Filter.pm
@@ -146,7 +146,7 @@ sub _check_field_name {
return undef unless $field_name;
if (substr($field_name, 0, 1) eq '~') {
$field_name = lc(trim($field_name));
- $field_name =~ /^~[a-z0-9_\.]+$/
+ $field_name =~ /^~[a-z0-9_\.\-]+$/
|| ThrowUserError('bugmail_filter_invalid');
length($field_name) <= 64
|| ThrowUserError('bugmail_filter_too_long');
diff --git a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
index 4be894c6f..a0ec2125f 100644
--- a/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
+++ b/extensions/BugmailFilter/template/en/default/hook/global/user-error-errors.html.tmpl
@@ -16,7 +16,7 @@
[% ELSIF error == "bugmail_filter_invalid" %]
[% title = "Invalid Field Name" %]
- The field name contains invalid characters (alpha-numeric, underscore and
- period only).
+ The field name contains invalid characters (alpha-numeric, underscore,
+ hyphen, and period only).
[% END %]