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
use separate accessors instead of checking field_format against list in CustomField#multi_value_possible?
Ivan Kuchin0b859db58ac9
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rbindex 19b625c91d7..076d972709d 100644--- a/app/models/custom_field.rb+++ b/app/models/custom_field.rb@@ -268,6 +268,10 @@ class CustomField < ApplicationRecordfield_format == "list"end+ def user?+ field_format == "user"+ end+def version?field_format == "version"end@@ -281,7 +285,7 @@ class CustomField < ApplicationRecordenddef multi_value_possible?- %w[version user list].include?(field_format)+ version? || user? || list?enddef allow_non_open_versions_possible?