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
Change case insensitive validations to false
Oliver Günther18e4ed1a9a2e
diff --git a/app/models/category.rb b/app/models/category.rbindex a905aacdcbc..1db15e12455 100644--- a/app/models/category.rb+++ b/app/models/category.rb@@ -33,7 +33,7 @@ class Category < ActiveRecord::Basehas_many :work_packages, foreign_key: 'category_id', dependent: :nullifyvalidates :name,- uniqueness: { scope: [:project_id], case_sensitive: true },+ uniqueness: { scope: [:project_id], case_sensitive: false },length: { maximum: 255 }# validates that assignee is member of the issue category's projectdiff --git a/app/models/enumeration.rb b/app/models/enumeration.rbindex ea7ac137ab2..7c9c4cdd436 100644--- a/app/models/enumeration.rb+++ b/app/models/enumeration.rb@@ -40,7 +40,9 @@ class Enumeration < ActiveRecord::Basebefore_destroy :check_integrityvalidates_presence_of :name- validates_uniqueness_of :name, scope: %i(type project_id)+ validates_uniqueness_of :name,+ scope: %i(type project_id),+ case_sensitive: falsevalidates_length_of :name, maximum: 30scope :shared, -> { where(project_id: nil) }diff --git a/app/models/type.rb b/app/models/type.rbindex 070b350dcd4..1a86a8d99af 100644--- a/app/models/type.rb+++ b/app/models/type.rb@@ -59,7 +59,7 @@ class ::Type < ActiveRecord::Basevalidates :name,presence: true,- uniqueness: { case_sensitive: true },+ uniqueness: { case_sensitive: false },length: { maximum: 255 }validates_inclusion_of :is_default, :is_milestone, in: [true, false]diff --git a/app/models/version.rb b/app/models/version.rbindex 2b673d96ab8..e74e12ee0ae 100644--- a/app/models/version.rb+++ b/app/models/version.rb@@ -41,7 +41,7 @@ class Version < ActiveRecord::Basevalidates :name,presence: true,- uniqueness: { scope: [:project_id], case_sensitive: true }+ uniqueness: { scope: [:project_id], case_sensitive: false }validates_format_of :effective_date, with: /\A\d{4}-\d{2}-\d{2}\z/, message: :not_a_date, allow_nil: truevalidates_format_of :start_date, with: /\A\d{4}-\d{2}-\d{2}\z/, message: :not_a_date, allow_nil: true