From 2c3a0bfc4382502094d4edfb200da1395bba1568 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 30 Oct 2009 01:14:11 +0000 Subject: Bug 460742: The type should be mandatory to create a custom field - Patch by Nitish Bezzala r/a=mkanat --- Bugzilla/Field.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index a2a08cd4b..077c67e20 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -837,6 +837,11 @@ sub run_create_validators { $params->{visibility_field_id}); my $type = $params->{type} || 0; + + if ($params->{custom} && !$type) { + ThrowCodeError('field_type_not_specified'); + } + $params->{value_field_id} = $class->_check_value_field_id($params->{value_field_id}, ($type == FIELD_TYPE_SINGLE_SELECT -- cgit v1.2.3-24-g4f1b