aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/Field.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Field.pm')
-rw-r--r--Bugzilla/Field.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index 1cc89239e..a71afef35 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -15,6 +15,7 @@
# Contributor(s): Dan Mosedale <dmose@mozilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
# Myk Melez <myk@mozilla.org>
+# Greg Hendricks <ghendricks@novell.com>
=head1 NAME
@@ -1033,8 +1034,14 @@ sub check_field {
my $dbh = Bugzilla->dbh;
# If $legalsRef is undefined, we use the default valid values.
+ # Valid values for this check are all possible values.
+ # Using get_legal_values would only return active values, but since
+ # some bugs may have inactive values set, we want to check them too.
unless (defined $legalsRef) {
- $legalsRef = get_legal_field_values($name);
+ $legalsRef = Bugzilla::Field->new({name => $name})->legal_values;
+ my @values = map($_->name, @$legalsRef);
+ $legalsRef = \@values;
+
}
if (!defined($value)