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
[#64522] Untitled sections are not displayed on PDF export
as-op7da8984e3116
diff --git a/modules/meeting/app/workers/meetings/pdf/agenda.rb b/modules/meeting/app/workers/meetings/pdf/agenda.rbindex a66d3888c17..ead86de7f64 100644--- a/modules/meeting/app/workers/meetings/pdf/agenda.rb+++ b/modules/meeting/app/workers/meetings/pdf/agenda.rb@@ -53,11 +53,13 @@ module Meetings::PDFdef write_section(section, section_index)write_optional_page_break- write_section_title(section, section_index) unless section.title.empty?+ write_section_title(section, section_index)write_agenda_items(section)enddef write_section_title(section, section_index)+ return if section.title.blank? && section_index == 0 && meeting.sections.count == 1+margins = styles.agenda_section_title_table_marginsmargins = margins.merge({ top_margin: 0 }) if section_index == 0with_vertical_margin(margins) dodiff --git a/modules/meeting/spec/workers/meetings/exporter_spec.rb b/modules/meeting/spec/workers/meetings/exporter_spec.rbindex b19dbb829c4..969d557fad8 100644--- a/modules/meeting/spec/workers/meetings/exporter_spec.rb+++ b/modules/meeting/spec/workers/meetings/exporter_spec.rb@@ -130,12 +130,20 @@ RSpec.describe Meetings::Exporter dolet(:type_task) { create(:type_task) }let(:status) { create(:status, is_default: true, name: "Workin' on it") }let(:work_package) { create(:work_package, project:, status:, subject: "Important task", type: type_task) }- let(:meeting_section) { create(:meeting_section, meeting:, title: "Section Work in Progress") }+ let(:meeting_section) { create(:meeting_section, meeting:, title: nil) }+ let(:meeting_section_second) { create(:meeting_section, meeting:, title: "Second section") }let(:meeting_agenda_item) docreate(:meeting_agenda_item, meeting_section:, duration_in_minutes: 15, title: "Agenda Item TOP 1", presenter: user,notes: "**foo**")end- let(:wp_agenda_item) { create(:wp_meeting_agenda_item, meeting:, work_package:, duration_in_minutes: 10, notes: "*bar*") }+ let(:wp_agenda_item) do+ create(:wp_meeting_agenda_item,+ meeting:,+ meeting_section: meeting_section_second,+ work_package:,+ duration_in_minutes: 10,+ notes: "*bar*")+ endlet(:outcome) { create(:meeting_outcome, meeting_agenda_item:, notes: "An outcome") }let(:attachment) { create(:attachment, container: meeting) }let(:meeting_backlog_item) do@@ -173,13 +181,15 @@ RSpec.describe Meetings::Exporter do"Meeting agenda",- "Section Work in Progress", " ", "25 mins",+ "Untitled section", " ", "15 mins","Agenda Item TOP 1", " ", "15 mins", " ", "Export User","foo","Outcome","An outcome",+ "Second section", " ", "10 mins",+"Task", "##{work_package.id}", "Important task", " (Workin' on it)", " ", "10 mins","bar",@@ -215,11 +225,11 @@ RSpec.describe Meetings::Exporter do*single_meeting_head,"Meeting agenda",- "Section Work in Progress", " ", "25 mins",-+ "Untitled section", " ", "15 mins","Agenda Item TOP 1", " ", "15 mins", " ", "Export User","foo",+ "Second section", " ", "10 mins","Task", "##{work_package.id}", "Important task", " (Workin' on it)", " ", "10 mins","bar",