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

hide derived_* from form configuration

ulferts2154701a026a
diff --git a/app/models/type/attributes.rb b/app/models/type/attributes.rb
index bb2bfbb98a8..543a9cd1c45 100644
--- a/app/models/type/attributes.rb
+++ b/app/models/type/attributes.rb
@@ -31,6 +31,17 @@
module Type::Attributes
extend ActiveSupport::Concern
+ EXCLUDED = %w[_type
+ _dependencies
+ attribute_groups
+ links parent_id
+ parent
+ description
+ schedule_manually
+ derived_start_date
+ derived_due_date
+ derived_estimated_time].freeze
+
included do
# Allow plugins to define constraints
# that disable a given attribute for this type.
@@ -120,9 +131,7 @@ module Type::Attributes
# We always want to include the priority even if its required
return false if key == 'priority'
-
- skip = %w[_type _dependencies attribute_groups links parent_id parent description schedule_manually]
- skip.include?(key) || definition[:required]
+ EXCLUDED.include?(key) || definition[:required]
end
def merge_date_for_form_attributes(attributes)