diff options
author | Koosha Khajeh Moogahi <koosha.khajeh@gmail.com> | 2012-06-09 00:16:16 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-06-09 00:16:16 +0200 |
commit | 89b41766cc47e26c59bfd95e351ab7767c394ab9 (patch) | |
tree | bb811f1c60b7b39eff2849cdb9829ae241823096 /Bugzilla | |
parent | 5aa5bbfb163700a04202093000d839c9579658a4 (diff) | |
download | bugzilla-89b41766cc47e26c59bfd95e351ab7767c394ab9.tar.gz bugzilla-89b41766cc47e26c59bfd95e351ab7767c394ab9.tar.xz |
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
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Bug.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index a848c866b..741475a74 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1953,6 +1953,12 @@ sub _check_field_is_mandatory { 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') { $value = join('', @$value); } |