From: Jean-Philippe Lang Date: Sat, 9 Nov 2013 11:19:06 +0000 (+0000) Subject: Custom fields in issue form - splitting is incorrect (#15227). X-Git-Tag: 2.4.0~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bff12254acf053d33b6cbcdcfea7c00da7c21f99;p=redmine.git Custom fields in issue form - splitting is incorrect (#15227). git-svn-id: http://svn.redmine.org/redmine/trunk@12251 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/issues/_form_custom_fields.html.erb b/app/views/issues/_form_custom_fields.html.erb index 4da98eb13..6182c28f6 100644 --- a/app/views/issues/_form_custom_fields.html.erb +++ b/app/views/issues/_form_custom_fields.html.erb @@ -1,8 +1,9 @@ +<% custom_field_values = @issue.editable_custom_field_values %>
<% i = 0 %> -<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %> -<% @issue.editable_custom_field_values.each do |value| %> +<% split_on = (custom_field_values.size / 2.0).ceil - 1 %> +<% custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>

<% if i == split_on -%>