Defect #33275

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

Added by Andreas Baumgärtner about 1 month ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Custom fields
Target version:4.0.8
Resolution:Fixed Affected version:4.0.7

Description

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 (90.1 KB) Andreas Baumgärtner, 2020-04-08 08:43

Associated revisions

Revision 19742
Added by Go MAEDA about 1 month ago

Possible values field in list format custom field form is not marked as required (#33275).

Patch by Go MAEDA.

Revision 19743
Added by Go MAEDA about 1 month ago

Merged r19742 from trunk to 4.1-stable (#33275).

Revision 19744
Added by Go MAEDA about 1 month ago

Merged r19742 from trunk to 4.0-stable (#33275).

History

#1 Updated by Go MAEDA about 1 month ago

  • Target version set to Candidate for next minor release
  • Affected version changed from 4.1.1 to 4.0.7

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

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>

#2 Updated by Marius BALTEANU about 1 month ago

  • Target version changed from Candidate for next minor release to 4.0.8

#3 Updated by Go MAEDA about 1 month ago

  • Subject changed from Custom fields / Format List - "Possible values" is not marked as mandatory (cosmetic) to Possible values field in list format custom field form is not marked as required
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix.

Also available in: Atom PDF