プロジェクト

全般

プロフィール

Vote #80802

完了

Possible values field in list format custom field form is not marked as required

Admin Redmine さんが約4年前に追加. 約4年前に更新.

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

0%

予定工数:
category_id:
14
version_id:
161
issue_org_id:
33275
author_id:
120777
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
159
ステータス-->[Closed]

説明

when creating a custom field of format List, "Possible values" is not marked as mandatory - * is missing.

see screenshot - error when trying to save with empty "Possible values"

!redmine_custom_fields_format_list_empty_error.jpg!


journals

Thank you for reporting the issue. It can be fixed by the following patch.

<pre><code class="diff">
diff --git a/app/views/custom_fields/formats/_list.html.erb b/app/views/custom_fields/formats/_list.html.erb
index 675bbbf8d..f615e5057 100644
--- a/app/views/custom_fields/formats/_list.html.erb
+++ b/app/views/custom_fields/formats/_list.html.erb
@@ -1,5 +1,5 @@
<p>
- <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
+ <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15, :required => true %>
<em class="info"><%= l(:text_custom_field_possible_values_info) %></em>
</p>
<p><%= f.text_field(:default_value) %></p>
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the fix.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

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

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

いいね!0
いいね!0