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

[#61358] User cannot see the upcoming tab of a meeting series if it consists of only one ongoing meeting

Oliver Günthercaaa2929aba4
diff --git a/modules/meeting/app/views/recurring_meetings/_show_upcoming.html.erb b/modules/meeting/app/views/recurring_meetings/_show_upcoming.html.erb
index 1c744d5e68c..18b9fce5bef 100644
--- a/modules/meeting/app/views/recurring_meetings/_show_upcoming.html.erb
+++ b/modules/meeting/app/views/recurring_meetings/_show_upcoming.html.erb
@@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% if @recurring_meeting.has_ended? -%>
+<% if @recurring_meeting.has_ended? && @recurring_meeting.ongoing_meetings.empty? -%>
<%=
render(Primer::Beta::Blankslate.new(border: true)) do |component|
component.with_visual_icon(icon: :book)
diff --git a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
index 423503d695b..79de2454535 100644
--- a/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
+++ b/modules/meeting/spec/requests/recurring_meetings/recurring_meetings_show_spec.rb
@@ -166,6 +166,46 @@ RSpec.describe "Recurring meetings show",
end
end
+ describe "upcoming meeting that is already closed" do
+ shared_let(:recurring_meeting) do
+ create :recurring_meeting,
+ project:,
+ author: user,
+ start_time: Time.zone.today + 10.hours,
+ end_after: "iterations",
+ iterations: 1,
+ frequency: "daily"
+ end
+
+ let!(:ongoing_meeting) do
+ create(:structured_meeting, recurring_meeting:, start_time: Time.zone.today + 10.hours, state: :open)
+ end
+ let!(:ongoing_schedule) do
+ create :scheduled_meeting,
+ meeting: ongoing_meeting,
+ recurring_meeting:,
+ start_time: Time.zone.today + 10.hours
+ end
+
+ it "does not show the meeting ended blankslate" do
+ travel_to(Time.zone.today + 9.hours) do
+ get recurring_meeting_path(recurring_meeting)
+ end
+
+ expect(page).to have_text format_time(ongoing_meeting.start_time)
+ expect(page).to have_text "No more planned meetings"
+ expect(page).to have_no_text "Meeting series ended"
+
+ travel_to(Time.zone.today + 10.hours + 5.minutes) do
+ get recurring_meeting_path(recurring_meeting)
+ end
+
+ expect(page).to have_text format_time(ongoing_meeting.start_time)
+ expect(page).to have_text "No more planned meetings"
+ expect(page).to have_no_text "Meeting series ended"
+ end
+ end
+
describe "upcoming quick filter" do
context "with a rescheduled meeting" do
let!(:rescheduled_instance) do