From 79ec29975ac8d1a4f49b83ed404a1ee04c33b73c Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Mon, 30 Mar 2015 18:53:57 +0100 Subject: Bug 1007605 - Make FIXED non-fixed, by changing noresolveonopenblockers to define what the fixed resolution is. r,a=glob --- Bugzilla/Config/Common.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Config/Common.pm') diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 52a2f8f11..95b1e3189 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -28,7 +28,7 @@ use parent qw(Exporter); check_ip check_mail_delivery_method check_notification check_bug_status check_smtp_auth check_theschwartz_available check_maxattachmentsize check_email check_smtp_ssl - check_comment_taggers_group check_smtp_server + check_comment_taggers_group check_smtp_server check_resolution ); # Checking functions for the various values @@ -164,6 +164,18 @@ sub check_bug_status { return ""; } +sub check_resolution { + my $resolution = shift; + my $resolution_field = Bugzilla::Field->new({ name => 'resolution', cache => 1 }); + # The empty resolution is included - it represents "no value" + my @resolutions = map {$_->name} @{ $resolution_field->legal_values }; + + if (!grep($_ eq $resolution, @resolutions)) { + return "Must be blank or a valid resolution: one of " . join(', ', @resolutions); + } + return ""; +} + sub check_group { my $group_name = shift; return "" unless $group_name; @@ -464,6 +476,8 @@ valid group is provided. =item check_bug_status +=item check_resolution + =item check_shadowdb =item check_smtp_server -- cgit v1.2.3-24-g4f1b