Commit 15659830 authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Frédéric Buclin

Bug 577014: [SINGLE|MULTIPLE]_SELECT custom fields with no new values,…

Bug 577014: [SINGLE|MULTIPLE]_SELECT custom fields with no new values, containing only the default value '---' and marked as mandatory, blocks the user to update/create a bug r/a=LpSolit
parent 4a73f6aa
...@@ -1920,6 +1920,12 @@ sub _check_field_is_mandatory { ...@@ -1920,6 +1920,12 @@ sub _check_field_is_mandatory {
return if !$field->is_visible_on_bug($params || $invocant); return if !$field->is_visible_on_bug($params || $invocant);
return if ($field->type == FIELD_TYPE_SINGLE_SELECT
&& scalar @{ get_legal_field_values($field->name) } == 1);
return if ($field->type == FIELD_TYPE_MULTI_SELECT
&& !scalar @{ get_legal_field_values($field->name) });
if (ref($value) eq 'ARRAY') { if (ref($value) eq 'ARRAY') {
$value = join('', @$value); $value = join('', @$value);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment