From bff12254acf053d33b6cbcdcfea7c00da7c21f99 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 9 Nov 2013 11:19:06 +0000 Subject: [PATCH] Custom fields in issue form - splitting is incorrect (#15227). git-svn-id: http://svn.redmine.org/redmine/trunk@12251 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_form_custom_fields.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -%>
-- 2.39.5