OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove length restriction on CustomField#name
Oliver Günthera8652d74832b
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rbindex 2d121527635..c436235481b 100644--- a/app/models/custom_field.rb+++ b/app/models/custom_field.rb@@ -49,7 +49,7 @@ class CustomField < ApplicationRecordvalidates :custom_options,presence: { message: ->(*) { I18n.t(:'activerecord.errors.models.custom_field.at_least_one_custom_option') } },if: ->(*) { field_format == 'list' }- validates :name, presence: true, length: { maximum: 30 }+ validates :name, presence: true, length: { maximum: 256 }validate :uniqueness_of_name_with_scopediff --git a/db/migrate/20210628185054_extend_custom_field_name_length.rb b/db/migrate/20210628185054_extend_custom_field_name_length.rbnew file mode 100644index 00000000000..4d4eac19806--- /dev/null+++ b/db/migrate/20210628185054_extend_custom_field_name_length.rb@@ -0,0 +1,9 @@+class ExtendCustomFieldNameLength < ActiveRecord::Migration[6.1]+ def up+ change_column :custom_fields, :name, :string, limit: nil+ end++ def down+ change_column :custom_fields, :name, :string, limit: 30+ end+end