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
Fix custom field long text rendering on the project list page. Display "Preview not available" correctly.
Dombi Attila9dc9f81ee09b
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rbindex 62e6d88d489..5e195d7500f 100644--- a/app/components/projects/row_component.rb+++ b/app/components/projects/row_component.rb@@ -54,10 +54,10 @@ module Projectsreturn nil unless user_can_view_project?cf = column.custom_field- custom_value = project.formatted_custom_value_for(cf)+ custom_value = project.custom_value_for(cf)if cf.field_format == "text" && custom_value.present?- render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-cf-#{cf.id}", cf.name, custom_value.html_safe) # rubocop:disable Rails/OutputSafety+ render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-cf-#{cf.id}", cf.name, custom_value.value)elsif custom_value.is_a?(Array)safe_join(Array(custom_value).compact_blank, ", ")elsediff --git a/modules/overviews/app/components/project_custom_fields/sections/show_component.html.erb b/modules/overviews/app/components/project_custom_fields/sections/show_component.html.erbindex 2915d478186..d84f8f3b013 100644--- a/modules/overviews/app/components/project_custom_fields/sections/show_component.html.erb+++ b/modules/overviews/app/components/project_custom_fields/sections/show_component.html.erb@@ -28,7 +28,7 @@@project_custom_fields.each do |project_custom_field|details_container.with_row(mb: 3) dorender(ProjectCustomFields::Sections::ProjectCustomFields::ShowComponent.new(- project_custom_field: project_custom_field,+ project_custom_field: ,project_custom_field_values: get_eager_loaded_project_custom_field_values_for(project_custom_field.id)))end