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
Satisfy rubocop
Judith Rothe271f113e8bd
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rbindex bf6b51d6892..1693de4871f 100644--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb@@ -29,13 +29,13 @@module Settingsmodule ProjectCustomFieldsmodule ProjectCustomFieldMapping- class NewProjectMappingFormComponent < ApplicationComponent+ class NewProjectMappingFormComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponentinclude OpTurbo::Streamable- DIALOG_ID = "settings--new-project-custom-field-mapping-component"- DIALOG_BODY_ID = "settings--new-project-custom-field-mapping-body-component"+ DIALOG_ID = "settings--new-project-custom-field-mapping-component".freeze+ DIALOG_BODY_ID = "settings--new-project-custom-field-mapping-body-component".freeze- def initialize(project_mapping:, project_custom_field: )+ def initialize(project_mapping:, project_custom_field:)super@project_mapping = project_mapping@project_custom_field = project_custom_fielddiff --git a/app/controllers/admin/settings/project_custom_fields_controller.rb b/app/controllers/admin/settings/project_custom_fields_controller.rbindex 625e51d5ce9..09ef27e4aee 100644--- a/app/controllers/admin/settings/project_custom_fields_controller.rb+++ b/app/controllers/admin/settings/project_custom_fields_controller.rb@@ -39,8 +39,7 @@ module Admin::Settings# rubocop:disable Rails/LexicallyScopedActionFilterbefore_action :set_sections, only: %i[show index edit update move drop]- before_action :find_custom_field,- only: %i(show edit project_mappings new_link link unlink update destroy delete_option reorder_alphabetical move drop)+ before_action :find_custom_field, except: %i(index new)before_action :prepare_custom_option_position, only: %i(update create)before_action :find_custom_option, only: :delete_optionbefore_action :project_custom_field_mappings_query, only: %i[project_mappings unlink]@@ -204,10 +203,10 @@ module Admin::Settingsproject_mapping = ProjectCustomFieldProjectMapping.new(project_custom_field: @custom_field)project_mapping.errors.add(:project_ids, :blank)component = Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent.new(- project_mapping: project_mapping,+ project_mapping:,project_custom_field: @custom_field)- update_via_turbo_stream(component: component, status: :bad_request)+ update_via_turbo_stream(component:, status: :bad_request)respond_with_turbo_streamsfalseenddiff --git a/spec/features/admin/project_custom_fields/project_mappings_spec.rb b/spec/features/admin/project_custom_fields/project_mappings_spec.rbindex b5571a328f1..22d5339a287 100644--- a/spec/features/admin/project_custom_fields/project_mappings_spec.rb+++ b/spec/features/admin/project_custom_fields/project_mappings_spec.rb@@ -88,7 +88,7 @@ RSpec.describe "Project Custom Field Mappings", :js doit "shows an error in the dialog when no project is selected before adding" docreate(:project)- expect(page).not_to have_css("dialog")+ expect(page).to have_no_css("dialog")click_on "Add projects"page.within("dialog") do