Skip to content

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

Remove visible condition from CustomValue callback

Dombi Attila13c23118e5c2
diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb
index 4469a75ecee..3258e11f270 100644
--- a/app/models/custom_value.rb
+++ b/app/models/custom_value.rb
@@ -73,9 +73,7 @@ class CustomValue < ApplicationRecord
# if a custom value is created for a project via CustomValue.create(...),
# the custom field needs to be activated in the project
- if customized&.available_custom_fields&.include?(custom_field) &&
- customized&.project_custom_fields&.exclude?(custom_field)
-
+ if customized&.project_custom_fields&.exclude?(custom_field)
customized.project_custom_fields << custom_field
end
end