summaryrefslogtreecommitdiffstats
path: root/extensions/ComponentWatching
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-07-03 07:34:08 +0200
committerByron Jones <bjones@mozilla.com>2012-07-03 07:34:08 +0200
commitff616427fbde1fa2be55822844fc5e66f45aaf93 (patch)
tree6e01f054d80abfdb9cf8c53a2416d629818373da /extensions/ComponentWatching
parent2e880314333e9c9ff89e7f686d58ad5ba313180b (diff)
downloadbugzilla-ff616427fbde1fa2be55822844fc5e66f45aaf93.tar.gz
bugzilla-ff616427fbde1fa2be55822844fc5e66f45aaf93.tar.xz
Bug 684701: make "watch user" mandatory
Diffstat (limited to 'extensions/ComponentWatching')
-rw-r--r--extensions/ComponentWatching/Extension.pm4
-rw-r--r--extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl4
2 files changed, 7 insertions, 1 deletions
diff --git a/extensions/ComponentWatching/Extension.pm b/extensions/ComponentWatching/Extension.pm
index db191dfbe..2b583ee4e 100644
--- a/extensions/ComponentWatching/Extension.pm
+++ b/extensions/ComponentWatching/Extension.pm
@@ -160,7 +160,9 @@ sub _check_watch_user {
my ($self, $value, $field) = @_;
$value = trim($value || '');
- return if $value eq '';
+ if ($value eq '') {
+ ThrowUserError('component_watch_missing_watch_user');
+ }
if ($value !~ /\.bugs$/i) {
ThrowUserError('component_watch_invalid_watch_user');
}
diff --git a/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
index 8da2f2790..01dbb5114 100644
--- a/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
+++ b/extensions/ComponentWatching/template/en/default/hook/global/user-error-errors.html.tmpl
@@ -10,4 +10,8 @@
[% title = "Invalid Watch User" %]
The "Watch User" must be a <b>.bugs</b> email address.<br>
For example: <i>accessibility-apis@core.bugs</i>
+[% ELSIF error == "component_watch_missing_watch_user" %]
+ [% title = "Missing Watch User" %]
+ You must provide a <b>.bugs</b> email address for the "Watch User".<br>
+ For example: <i>accessibility-apis@core.bugs</i>
[% END %]