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
chore[Op#54749]: have the component control it's own rendering state
Kabiru Mwenja2b038f43d763
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rbindex 765e1b76938..d2d86332e3f 100644--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb@@ -39,6 +39,10 @@ module Settingssuper(@project_mapping, **)end+ def render?+ !@project_custom_field.required?+ end+privatedef titlediff --git a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb b/app/views/admin/settings/project_custom_fields/project_mappings.html.erbindex 4b34a40450e..09193be00a5 100644--- a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb+++ b/app/views/admin/settings/project_custom_fields/project_mappings.html.erb@@ -35,12 +35,10 @@ See COPYRIGHT and LICENSE files for more details.%><%=- unless @custom_field.required?- render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingComponent.new(- project_mapping: @project_mapping,- project_custom_field: @custom_field- ))- end+ render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingComponent.new(+ project_mapping: @project_mapping,+ project_custom_field: @custom_field+ ))%><%=