プロジェクト

全般

プロフィール

Vote #74548

完了

Custom fields in issue form - splitting is incorrect

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
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:
ステータス-->[Closed]

説明

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.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリCustom fields_14 にセット
  • 対象バージョン2.4.0_70 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0