Remove BCF thumbnail from default form configuration

(cherry picked from commit 904f709ea3)
pull/7480/head
Wieland Lindenthal 5 years ago
parent 4eba5f11d5
commit 79990c1cf8
  1. 11
      app/models/type/attribute_groups.rb

@ -165,20 +165,25 @@ module Type::AttributeGroups
end
end
##
# Get the default attribute groups for this type.
# If it has activated custom fields through +custom_field_ids=+,
# it will put them into the other group.
def work_package_attributes_by_default_group_key
active_cfs = active_custom_field_attributes
work_package_attributes
.keys
.reject { |key| CustomField.custom_field_attribute?(key) && !active_cfs.include?(key) }
.select { |key| default_attribute?(active_cfs, key) }
.group_by { |key| default_group_key(key.to_sym) }
end
##
# Custom fields should not get included into the default form configuration.
# This method might get patched by modules.
def default_attribute?(active_cfs, key)
!(CustomField.custom_field_attribute?(key) && !active_cfs.include?(key))
end
def to_attribute_group_class(groups)
groups.map do |group|
attributes = group[1]

Loading…
Cancel
Save