Skip to content

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

Fix section position to work with backlogs

Mir Bhatia0fb8b3ac55ed
diff --git a/modules/meeting/app/components/meeting_sections/header_component.rb b/modules/meeting/app/components/meeting_sections/header_component.rb
index fca56a8d8f8..e86f5c5c93a 100644
--- a/modules/meeting/app/components/meeting_sections/header_component.rb
+++ b/modules/meeting/app/components/meeting_sections/header_component.rb
@@ -72,7 +72,7 @@ module MeetingSections
if @first_and_last.first
@first_and_last.first == @meeting_section
else
- @meeting_section.first?
+ @meeting_section.first_after_backlog?
end
end
diff --git a/modules/meeting/app/models/meeting_section.rb b/modules/meeting/app/models/meeting_section.rb
index 82005c724ae..7d31927357d 100644
--- a/modules/meeting/app/models/meeting_section.rb
+++ b/modules/meeting/app/models/meeting_section.rb
@@ -72,4 +72,8 @@ class MeetingSection < ApplicationRecord
agenda_items.maximum(:position) + 1
end
end
+
+ def first_after_backlog?
+ position == meeting.backlog.position + 1
+ end
end