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
WIP: generalize custom field inputs a bit more, support single custom field form, minor refactoring
Jonas Jabari8ec7010f3a2a
diff --git a/app/forms/projects/custom_fields/inputs/base/autocomplete/multi_value_input.rb b/app/forms/custom_fields/inputs/base/autocomplete/multi_value_input.rbsimilarity index 89%rename from app/forms/projects/custom_fields/inputs/base/autocomplete/multi_value_input.rbrename to app/forms/custom_fields/inputs/base/autocomplete/multi_value_input.rbindex 23d602f2deb..505295bb706 100644--- a/app/forms/projects/custom_fields/inputs/base/autocomplete/multi_value_input.rb+++ b/app/forms/custom_fields/inputs/base/autocomplete/multi_value_input.rb@@ -26,13 +26,13 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Base::Autocomplete::MultiValueInput < ApplicationForm- include Projects::CustomFields::Inputs::Base::Utils+class CustomFields::Inputs::Base::Autocomplete::MultiValueInput < ApplicationForm+ include CustomFields::Inputs::Base::Utils- def initialize(custom_field:, custom_values:, project:)+ def initialize(custom_field:, custom_values:, object:)@custom_field = custom_field@custom_values = custom_values- @project = project+ @object = objectenddef input_attributesdiff --git a/app/forms/projects/custom_fields/inputs/base/autocomplete/single_value_input.rb b/app/forms/custom_fields/inputs/base/autocomplete/single_value_input.rbsimilarity index 88%rename from app/forms/projects/custom_fields/inputs/base/autocomplete/single_value_input.rbrename to app/forms/custom_fields/inputs/base/autocomplete/single_value_input.rbindex d6d11942942..b533da6f7a9 100644--- a/app/forms/projects/custom_fields/inputs/base/autocomplete/single_value_input.rb+++ b/app/forms/custom_fields/inputs/base/autocomplete/single_value_input.rb@@ -26,13 +26,13 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Base::Autocomplete::SingleValueInput < ApplicationForm- include Projects::CustomFields::Inputs::Base::Utils+class CustomFields::Inputs::Base::Autocomplete::SingleValueInput < ApplicationForm+ include CustomFields::Inputs::Base::Utils- def initialize(custom_field:, custom_value:, project:)+ def initialize(custom_field:, custom_value:, object:)@custom_field = custom_field@custom_value = custom_value- @project = project+ @object = objectenddef input_attributesdiff --git a/app/forms/projects/custom_fields/inputs/base/autocomplete/user_query_utils.rb b/app/forms/custom_fields/inputs/base/autocomplete/user_query_utils.rbsimilarity index 77%rename from app/forms/projects/custom_fields/inputs/base/autocomplete/user_query_utils.rbrename to app/forms/custom_fields/inputs/base/autocomplete/user_query_utils.rbindex dfb07b027f3..c487460a200 100644--- a/app/forms/projects/custom_fields/inputs/base/autocomplete/user_query_utils.rb+++ b/app/forms/custom_fields/inputs/base/autocomplete/user_query_utils.rb@@ -26,14 +26,16 @@# See COPYRIGHT and LICENSE files for more details.#++-module Projects::CustomFields::Inputs::Base::Autocomplete::UserQueryUtils+module CustomFields::Inputs::Base::Autocomplete::UserQueryUtilsdef user_autocomplete_options{placeholder: I18n.t(:label_user_search),resource:,+ # url: ::API::V3::Utilities::PathHelper::ApiV3Path.users,filters:,searchKey: search_key,- inputValue: input_value+ inputValue: input_value,+ focusDirectly: false}end@@ -48,18 +50,18 @@ module Projects::CustomFields::Inputs::Base::Autocomplete::UserQueryUtilsdef filters[{ name: 'type', operator: '=', values: ['User', 'Group', 'PlaceholderUser'] },- { name: 'member', operator: '=', values: [@project.id.to_s] },- { name: 'status', operator: '!', values: [User.statuses["locked"].to_s] }+ { name: 'member', operator: '=', values: [@object.id.to_s] },+ { name: 'status', operator: '!', values: [Principal.statuses["locked"].to_s] }]enddef input_value- "?#{input_values_filter}"+ "?#{input_values_filter}" unless init_user_ids.empty?enddef input_values_filter- # TODO: not working yet- user_filter = { "type" => { "operator" => "=", "values" => ["User"] } }+ # TODO: not working yet, would work with resource "users" and simple ids, but then the options cannot be loaded+ user_filter = { "type" => { "operator" => "=", "values" => ["User", "Group", "PlaceholderUser"] } }id_filter = { "id" => { "operator" => "=", "values" => init_user_ids } }filters = [user_filter, id_filter]diff --git a/app/forms/projects/custom_fields/inputs/base/input.rb b/app/forms/custom_fields/inputs/base/input.rbsimilarity index 88%rename from app/forms/projects/custom_fields/inputs/base/input.rbrename to app/forms/custom_fields/inputs/base/input.rbindex 5d2d5d0c450..e8b69c87657 100644--- a/app/forms/projects/custom_fields/inputs/base/input.rb+++ b/app/forms/custom_fields/inputs/base/input.rb@@ -26,13 +26,13 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Base::Input < ApplicationForm- include Projects::CustomFields::Inputs::Base::Utils+class CustomFields::Inputs::Base::Input < ApplicationForm+ include CustomFields::Inputs::Base::Utils- def initialize(custom_field:, custom_value:, project:)+ def initialize(custom_field:, custom_value:, object:)@custom_field = custom_field@custom_value = custom_value- @project = project+ @object = objectenddef input_attributesdiff --git a/app/forms/projects/custom_fields/inputs/base/utils.rb b/app/forms/custom_fields/inputs/base/utils.rbsimilarity index 93%rename from app/forms/projects/custom_fields/inputs/base/utils.rbrename to app/forms/custom_fields/inputs/base/utils.rbindex 0c5dfac8909..0f8f1a4dc43 100644--- a/app/forms/projects/custom_fields/inputs/base/utils.rb+++ b/app/forms/custom_fields/inputs/base/utils.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Projects::CustomFields::Inputs::Base::Utils+module CustomFields::Inputs::Base::Utilsdef base_input_attributes{id:,@@ -46,7 +46,7 @@ module Projects::CustomFields::Inputs::Base::Utilsdef name# TODO: get rid of this, should work with scope_name_to_model: true- "project[custom_field_values][#{@custom_field.id}]"+ "#{@object.class.name.downcase}[custom_field_values][#{@custom_field.id}]"enddef labeldiff --git a/app/forms/projects/custom_fields/inputs/bool.rb b/app/forms/custom_fields/inputs/bool.rbsimilarity index 94%rename from app/forms/projects/custom_fields/inputs/bool.rbrename to app/forms/custom_fields/inputs/bool.rbindex 161b3a009de..c3e6b1e2237 100644--- a/app/forms/projects/custom_fields/inputs/bool.rb+++ b/app/forms/custom_fields/inputs/bool.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Bool < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::Bool < CustomFields::Inputs::Base::Inputform do |custom_value_form|custom_value_form.check_box(**input_attributes)enddiff --git a/app/forms/projects/custom_fields/inputs/date.rb b/app/forms/custom_fields/inputs/date.rbsimilarity index 93%rename from app/forms/projects/custom_fields/inputs/date.rbrename to app/forms/custom_fields/inputs/date.rbindex 6eaa4297a02..2834b3a8a60 100644--- a/app/forms/projects/custom_fields/inputs/date.rb+++ b/app/forms/custom_fields/inputs/date.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Date < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::Date < CustomFields::Inputs::Base::Inputform do |custom_value_form|custom_value_form.text_field(**input_attributes)enddiff --git a/app/forms/projects/custom_fields/inputs/float.rb b/app/forms/custom_fields/inputs/float.rbsimilarity index 93%rename from app/forms/projects/custom_fields/inputs/float.rbrename to app/forms/custom_fields/inputs/float.rbindex 9a4c796ff96..62e45610b40 100644--- a/app/forms/projects/custom_fields/inputs/float.rb+++ b/app/forms/custom_fields/inputs/float.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Float < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::Float < CustomFields::Inputs::Base::Inputform do |custom_value_form|custom_value_form.text_field(**input_attributes)enddiff --git a/app/forms/projects/custom_fields/inputs/int.rb b/app/forms/custom_fields/inputs/int.rbsimilarity index 94%rename from app/forms/projects/custom_fields/inputs/int.rbrename to app/forms/custom_fields/inputs/int.rbindex e8987808890..ab5fc29e50d 100644--- a/app/forms/projects/custom_fields/inputs/int.rb+++ b/app/forms/custom_fields/inputs/int.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Int < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::Int < CustomFields::Inputs::Base::Inputform do |custom_value_form|custom_value_form.text_field(**input_attributes)enddiff --git a/app/forms/projects/custom_fields/inputs/multi_select_list.rb b/app/forms/custom_fields/inputs/multi_select_list.rbsimilarity index 94%rename from app/forms/projects/custom_fields/inputs/multi_select_list.rbrename to app/forms/custom_fields/inputs/multi_select_list.rbindex f7acb050b3a..e71ff69b873 100644--- a/app/forms/projects/custom_fields/inputs/multi_select_list.rb+++ b/app/forms/custom_fields/inputs/multi_select_list.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::MultiSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::MultiValueInput+class CustomFields::Inputs::MultiSelectList < CustomFields::Inputs::Base::Autocomplete::MultiValueInputform do |custom_value_form|# autocompleter does not set key with blank value if nothing is selected or input is cleared# in order to let acts_as_customizable handle the clearing of the value, we need to set the value to blank via a hidden fielddiff --git a/app/forms/projects/custom_fields/inputs/multi_user_select_list.rb b/app/forms/custom_fields/inputs/multi_user_select_list.rbsimilarity index 88%rename from app/forms/projects/custom_fields/inputs/multi_user_select_list.rbrename to app/forms/custom_fields/inputs/multi_user_select_list.rbindex d75890f6604..323577ac732 100644--- a/app/forms/projects/custom_fields/inputs/multi_user_select_list.rb+++ b/app/forms/custom_fields/inputs/multi_user_select_list.rb@@ -26,8 +26,8 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::MultiUserSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::MultiValueInput- include Projects::CustomFields::Inputs::Base::Autocomplete::UserQueryUtils+class CustomFields::Inputs::MultiUserSelectList < CustomFields::Inputs::Base::Autocomplete::MultiValueInput+ include CustomFields::Inputs::Base::Autocomplete::UserQueryUtilsform do |custom_value_form|# TODO: use user_autocompleter as seen on sharing form insteaddiff --git a/app/forms/projects/custom_fields/inputs/multi_version_select_list.rb b/app/forms/custom_fields/inputs/multi_version_select_list.rbsimilarity index 92%rename from app/forms/projects/custom_fields/inputs/multi_version_select_list.rbrename to app/forms/custom_fields/inputs/multi_version_select_list.rbindex 8094ce74e70..75ce18ef0ce 100644--- a/app/forms/projects/custom_fields/inputs/multi_version_select_list.rb+++ b/app/forms/custom_fields/inputs/multi_version_select_list.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::MultiVersionSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::MultiValueInput+class CustomFields::Inputs::MultiVersionSelectList < CustomFields::Inputs::Base::Autocomplete::MultiValueInputform do |custom_value_form|# autocompleter does not set key with blank value if nothing is selected or input is cleared# in order to let acts_as_customizable handle the clearing of the value, we need to set the value to blank via a hidden field@@ -34,7 +34,7 @@ class Projects::CustomFields::Inputs::MultiVersionSelectList < Projects::CustomFcustom_value_form.hidden(**input_attributes.merge(name: "#{input_attributes[:name]}[]", value:))custom_value_form.autocompleter(**input_attributes) do |list|- @project.versions.each do |version|+ @object.versions.each do |version|list.option(label: version.name, value: version.id,selected: selected?(version)diff --git a/app/forms/projects/custom_fields/inputs/single_select_list.rb b/app/forms/custom_fields/inputs/single_select_list.rbsimilarity index 94%rename from app/forms/projects/custom_fields/inputs/single_select_list.rbrename to app/forms/custom_fields/inputs/single_select_list.rbindex 4e326ac3caa..907200cb95d 100644--- a/app/forms/projects/custom_fields/inputs/single_select_list.rb+++ b/app/forms/custom_fields/inputs/single_select_list.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::SingleSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::SingleValueInput+class CustomFields::Inputs::SingleSelectList < CustomFields::Inputs::Base::Autocomplete::SingleValueInputform do |custom_value_form|# autocompleter does not set key with blank value if nothing is selected or input is cleared# in order to let acts_as_customizable handle the clearing of the value, we need to set the value to blank via a hidden fielddiff --git a/app/forms/projects/custom_fields/inputs/single_user_select_list.rb b/app/forms/custom_fields/inputs/single_user_select_list.rbsimilarity index 86%rename from app/forms/projects/custom_fields/inputs/single_user_select_list.rbrename to app/forms/custom_fields/inputs/single_user_select_list.rbindex 4dab874f24d..ada4dd25ff0 100644--- a/app/forms/projects/custom_fields/inputs/single_user_select_list.rb+++ b/app/forms/custom_fields/inputs/single_user_select_list.rb@@ -26,8 +26,8 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::SingleUserSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::SingleValueInput- include Projects::CustomFields::Inputs::Base::Autocomplete::UserQueryUtils+class CustomFields::Inputs::SingleUserSelectList < CustomFields::Inputs::Base::Autocomplete::SingleValueInput+ include CustomFields::Inputs::Base::Autocomplete::UserQueryUtilsform do |custom_value_form|# TODO: use user_autocompleter as seen on sharing form instead@@ -45,6 +45,6 @@ class Projects::CustomFields::Inputs::SingleUserSelectList < Projects::CustomFieenddef init_user_ids- [@custom_value.value]+ @custom_value.value.present? ? [@custom_value.value] : []endenddiff --git a/app/forms/projects/custom_fields/inputs/single_version_select_list.rb b/app/forms/custom_fields/inputs/single_version_select_list.rbsimilarity index 91%rename from app/forms/projects/custom_fields/inputs/single_version_select_list.rbrename to app/forms/custom_fields/inputs/single_version_select_list.rbindex 8a5b6bb9003..18ebebd03ff 100644--- a/app/forms/projects/custom_fields/inputs/single_version_select_list.rb+++ b/app/forms/custom_fields/inputs/single_version_select_list.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::SingleVersionSelectList < Projects::CustomFields::Inputs::Base::Autocomplete::SingleValueInput+class CustomFields::Inputs::SingleVersionSelectList < CustomFields::Inputs::Base::Autocomplete::SingleValueInputform do |custom_value_form|# autocompleter does not set key with blank value if nothing is selected or input is cleared# in order to let acts_as_customizable handle the clearing of the value, we need to set the value to blank via a hidden field@@ -35,7 +35,7 @@ class Projects::CustomFields::Inputs::SingleVersionSelectList < Projects::Customcustom_value_form.autocompleter(**input_attributes) do |list|# TODO: allow-non-open version setting is not yet respected!- @project.versions.each do |version|+ @object.versions.each do |version|list.option(label: version.name, value: version.id,selected: selected?(version)diff --git a/app/forms/projects/custom_fields/inputs/string.rb b/app/forms/custom_fields/inputs/string.rbsimilarity index 93%rename from app/forms/projects/custom_fields/inputs/string.rbrename to app/forms/custom_fields/inputs/string.rbindex 0205cf602c9..8af06d84e6a 100644--- a/app/forms/projects/custom_fields/inputs/string.rb+++ b/app/forms/custom_fields/inputs/string.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::String < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::String < CustomFields::Inputs::Base::Inputform do |custom_value_form|custom_value_form.text_field(**input_attributes)enddiff --git a/app/forms/projects/custom_fields/inputs/text.rb b/app/forms/custom_fields/inputs/text.rbsimilarity index 95%rename from app/forms/projects/custom_fields/inputs/text.rbrename to app/forms/custom_fields/inputs/text.rbindex c6683305fea..792c948138f 100644--- a/app/forms/projects/custom_fields/inputs/text.rb+++ b/app/forms/custom_fields/inputs/text.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::CustomFields::Inputs::Text < Projects::CustomFields::Inputs::Base::Input+class CustomFields::Inputs::Text < CustomFields::Inputs::Base::Inputform do |custom_value_form|# TODO: rich_text_area not working yet# Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '#project_project[new_custom_field_values_attributes][xyz][value]' is not a valid selector.diff --git a/app/forms/projects/custom_fields/form.rb b/app/forms/projects/custom_fields/form.rbindex 8358c9431a2..ef19e8bc668 100644--- a/app/forms/projects/custom_fields/form.rb+++ b/app/forms/projects/custom_fields/form.rb@@ -35,37 +35,37 @@ module Projects::CustomFieldsendend- def initialize(project:, custom_field_section: nil)+ def initialize(project:, custom_field_section: nil, custom_field: nil)super()@project = project@custom_field_section = custom_field_section+ @custom_field = custom_field++ if @custom_field_section.present? && @custom_field.present?+ raise ArgumentError,+ "Either custom_field_section or custom_field must be specified, but not both"+ endendprivatedef sorted_custom_fields- # TODO: move to service/modelreturn @custom_fields if @custom_fields.present?- @custom_fields ||= @project.available_custom_fields-- if @custom_field_section.present?- @custom_fields = @custom_fields- .where(custom_field_section_id: @custom_field_section.id)- end-- @custom_fields = @custom_fields.sort_by do |pcf|- [pcf.project_custom_field_section.position, pcf.position_in_custom_field_section]- end+ @custom_fields = if @custom_field.present?+ [@custom_field]+ elsif @custom_field_section.present?+ @project.sorted_available_custom_fields_by_section(@custom_field_section)+ else+ @project.sorted_available_custom_fields+ endenddef custom_field_input(builder, custom_field)if custom_field.multi_value?- custom_values = @project.custom_values_for_custom_field(id: custom_field.id)- multi_value_custom_field_input(builder, custom_field, custom_values)+ multi_value_custom_field_input(builder, custom_field)else- custom_value = @project.custom_value_for(custom_field.id)- single_value_custom_field_input(builder, custom_field, custom_value)+ single_value_custom_field_input(builder, custom_field)endend@@ -73,42 +73,45 @@ module Projects::CustomFields# TODOS:# - initial values for user inputs are not displayed# - allow/disallow-non-open version setting is not yet respected in the version selector+ # - rich text editor is not yet supported- def single_value_custom_field_input(builder, custom_field, custom_value)- form_args = { custom_field:, custom_value:, project: @project }+ def single_value_custom_field_input(builder, custom_field)+ custom_value = @project.custom_value_for(custom_field.id)+ form_args = { custom_field:, custom_value:, object: @project }case custom_field.field_formatwhen "string"- Projects::CustomFields::Inputs::String.new(builder, **form_args)+ CustomFields::Inputs::String.new(builder, **form_args)when "text"- Projects::CustomFields::Inputs::Text.new(builder, **form_args)+ CustomFields::Inputs::Text.new(builder, **form_args)when "int"- Projects::CustomFields::Inputs::Int.new(builder, **form_args)+ CustomFields::Inputs::Int.new(builder, **form_args)when "float"- Projects::CustomFields::Inputs::Float.new(builder, **form_args)+ CustomFields::Inputs::Float.new(builder, **form_args)when "list"- Projects::CustomFields::Inputs::SingleSelectList.new(builder, **form_args)+ CustomFields::Inputs::SingleSelectList.new(builder, **form_args)when "date"- Projects::CustomFields::Inputs::Date.new(builder, **form_args)+ CustomFields::Inputs::Date.new(builder, **form_args)when "bool"- Projects::CustomFields::Inputs::Bool.new(builder, **form_args)+ CustomFields::Inputs::Bool.new(builder, **form_args)when "user"- Projects::CustomFields::Inputs::SingleUserSelectList.new(builder, **form_args)+ CustomFields::Inputs::SingleUserSelectList.new(builder, **form_args)when "version"- Projects::CustomFields::Inputs::SingleVersionSelectList.new(builder, **form_args)+ CustomFields::Inputs::SingleVersionSelectList.new(builder, **form_args)endend- def multi_value_custom_field_input(builder, custom_field, custom_values)- form_args = { custom_field:, custom_values:, project: @project }+ def multi_value_custom_field_input(builder, custom_field)+ custom_values = @project.custom_values_for_custom_field(id: custom_field.id)+ form_args = { custom_field:, custom_values:, object: @project }case custom_field.field_formatwhen "list"- Projects::CustomFields::Inputs::MultiSelectList.new(builder, **form_args)+ CustomFields::Inputs::MultiSelectList.new(builder, **form_args)when "user"- Projects::CustomFields::Inputs::MultiUserSelectList.new(builder, **form_args)+ CustomFields::Inputs::MultiUserSelectList.new(builder, **form_args)when "version"- Projects::CustomFields::Inputs::MultiVersionSelectList.new(builder, **form_args)+ CustomFields::Inputs::MultiVersionSelectList.new(builder, **form_args)endendenddiff --git a/app/models/projects/acts_as_customizable_patches.rb b/app/models/projects/acts_as_customizable_patches.rbindex d3cf2f0825e..321792f33e5 100644--- a/app/models/projects/acts_as_customizable_patches.rb+++ b/app/models/projects/acts_as_customizable_patches.rb@@ -45,6 +45,21 @@ module Projects::ActsAsCustomizablePatches.where(id: active_custom_field_ids_of_project)end+ def available_custom_fields_by_section(section)+ available_custom_fields+ .where(custom_field_section_id: section.id)+ end++ def sorted_available_custom_fields+ available_custom_fields+ .sort_by { |pcf| [pcf.project_custom_field_section.position, pcf.position_in_custom_field_section] }+ end++ def sorted_available_custom_fields_by_section(section)+ available_custom_fields_by_section(section)+ .sort_by(&:position_in_custom_field_section)+ end+def custom_field_section_ids# we need to check if a project custom field belongs to a specific section when validating# we need a mapping of custom_field_id => custom_field_section_id as we don't want todiff --git a/modules/overviews/app/components/project_custom_fields/sections/edit_dialog_component.html.erb b/modules/overviews/app/components/project_custom_fields/sections/edit_dialog_component.html.erbindex ea0e6c62072..6f72a75610a 100644--- a/modules/overviews/app/components/project_custom_fields/sections/edit_dialog_component.html.erb+++ b/modules/overviews/app/components/project_custom_fields/sections/edit_dialog_component.html.erb@@ -8,7 +8,7 @@url: project_update_attributes_path(project_id: @project.id, section_id: @project_custom_field_section.id),) do |f|component_collection do |collection|- collection.with_component(Primer::Alpha::Dialog::Body.new(style: "max-height: 500px;")) do+ collection.with_component(Primer::Alpha::Dialog::Body.new(my: 3, style: "max-height: 500px;")) dof.fields_for(:custom_field_values) do |f|render(Projects::CustomFields::Form.new(f, project: @project, custom_field_section: @project_custom_field_section))end