Vote #74548
完了Custom fields in issue form - splitting is incorrect
開始日:
2022/05/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
14
version_id:
70
issue_org_id:
15227
author_id:
44924
assigned_to_id:
1
comments:
1
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
I think there is a bug in the custom fields rendering:
app/views/issues/_form_custom_fields.html.erb
<% i = 0 %>
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.editable_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 -%>
<% end -%>
<% i += 1 -%>
<% end -%>
I think the line
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
should be
<% split_on = (@issue.editable_custom_field_values.size / 2.0).ceil - 1 %>
Since the calculation should be according to the custom fields that are going to be shown.
Thanks.
journals
Fixed in r12251, thanks for pointing this out.
--------------------------------------------------------------------------------
いいね!0