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
Moves the validations to the legacy contract
Marcello Rochadd5c2a9a5b92
diff --git a/app/contracts/types/base_contract.rb b/app/contracts/types/base_contract.rbindex 5e756d68b32..8a1920e93e0 100644--- a/app/contracts/types/base_contract.rb+++ b/app/contracts/types/base_contract.rb@@ -46,6 +46,9 @@ module Typesattribute :attribute_groupsattribute :patterns+ validates :name, presence: true, length: { maximum: 255 }+ validates :is_default, :is_milestone, :is_in_roadmap, inclusion: { in: [true, false] }+validate :validate_current_user_is_adminvalidate :validate_attribute_group_namesvalidate :validate_attribute_groups