summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-06-15 20:10:50 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-06-15 20:10:50 +0200
commitf53defbc217f63e9504da972aa05664ab0bd9336 (patch)
tree28d685da9dbb51f2c7cab5def0dee6273b6b8d07 /Bugzilla
parent1ed6e01bea6e511a02d58d2480b1472dc7d203c9 (diff)
downloadbugzilla-f53defbc217f63e9504da972aa05664ab0bd9336.tar.gz
bugzilla-f53defbc217f63e9504da972aa05664ab0bd9336.tar.xz
Bug 1169767: Upgrading from pre-4.4 to master fails
r=dkl a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Config/BugChange.pm18
1 files changed, 8 insertions, 10 deletions
diff --git a/Bugzilla/Config/BugChange.pm b/Bugzilla/Config/BugChange.pm
index 986a74485..212f4c171 100644
--- a/Bugzilla/Config/BugChange.pm
+++ b/Bugzilla/Config/BugChange.pm
@@ -13,6 +13,7 @@ use warnings;
use Bugzilla::Config::Common;
use Bugzilla::Status;
+use Bugzilla::Field;
our $sortkey = 500;
@@ -31,15 +32,6 @@ sub get_param_list {
@closed_bug_statuses = @current_closed_states if scalar(@current_closed_states);
};
- my $resolution_field = Bugzilla::Field->new({ name => 'resolution', cache => 1 });
- my @resolutions = ();
- # The 'fielddefs' table is not yet populated when running checksetup.pl
- # for the first time.
- if ($resolution_field) {
- # The empty resolution is included - it represents "no value"
- @resolutions = map {$_->name} @{ $resolution_field->legal_values };
- }
-
my @param_list = (
{
name => 'duplicate_or_move_bug_status',
@@ -82,7 +74,7 @@ sub get_param_list {
{
name => 'resolution_forbidden_with_open_blockers',
type => 's',
- choices => \@resolutions,
+ choices => \&_get_resolutions,
default => '',
checker => \&check_resolution,
} );
@@ -90,4 +82,10 @@ sub get_param_list {
return @param_list;
}
+sub _get_resolutions {
+ my $resolution_field = Bugzilla::Field->new({ name => 'resolution', cache => 1 });
+ # The empty resolution is included - it represents "no value".
+ return [ map { $_->name } @{ $resolution_field->legal_values } ];
+}
+
1;