summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-10-30 02:14:11 +0100
committerlpsolit%gmail.com <>2009-10-30 02:14:11 +0100
commit2c3a0bfc4382502094d4edfb200da1395bba1568 (patch)
treed2baab20285fd8bd08fa875797d711f0b48e67dd /Bugzilla
parent145f177dace8458cfb725e4405da1c77f86786cf (diff)
downloadbugzilla-2c3a0bfc4382502094d4edfb200da1395bba1568.tar.gz
bugzilla-2c3a0bfc4382502094d4edfb200da1395bba1568.tar.xz
Bug 460742: The type should be mandatory to create a custom field - Patch by Nitish Bezzala <nbezzala@yahoo.com> r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Field.pm5
1 files changed, 5 insertions, 0 deletions
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