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
[#57814] exclude existing hierarchy fields from config lists
Eric Schuberte0097af30ea3
diff --git a/app/controllers/projects/settings/custom_fields_controller.rb b/app/controllers/projects/settings/custom_fields_controller.rbindex ffd9d0b6244..8c8009fc898 100644--- a/app/controllers/projects/settings/custom_fields_controller.rb+++ b/app/controllers/projects/settings/custom_fields_controller.rb@@ -30,7 +30,9 @@ class Projects::Settings::CustomFieldsController < Projects::SettingsControllermenu_item :settings_custom_fieldsdef show- @wp_custom_fields = WorkPackageCustomField.order("lower(name)")+ @wp_custom_fields = WorkPackageCustomField+ .order("lower(name)")+ .where.not(field_format: "hierarchy") # TODO: Remove after enabling hierarchy fieldsenddef updatediff --git a/app/models/type/attributes.rb b/app/models/type/attributes.rbindex 61a0cc8f3c8..e9e14b85d17 100644--- a/app/models/type/attributes.rb+++ b/app/models/type/attributes.rb@@ -146,7 +146,9 @@ module Type::Attributesenddef add_custom_fields_to_form_attributes(attributes)- WorkPackageCustomField.includes(:custom_options).all.find_each do |field|+ WorkPackageCustomField.includes(:custom_options)+ .where.not(field_format: "hierarchy") # TODO: Remove after enabling hierarchy fields+ .find_each do |field|attributes[field.attribute_name] = {required: field.is_required,has_default: field.default_value.present?,