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

Have meetings "Send notifications" unchecked by default

Oliver Güntherd35fddb69989
diff --git a/modules/meeting/app/views/meetings/_form.html.erb b/modules/meeting/app/views/meetings/_form.html.erb
index 5a926e75def..af48e62e620 100644
--- a/modules/meeting/app/views/meetings/_form.html.erb
+++ b/modules/meeting/app/views/meetings/_form.html.erb
@@ -197,7 +197,7 @@ See COPYRIGHT and LICENSE files for more details.
<div class="form--field-container">
<%= styled_check_box_tag 'send_notifications',
1,
- true %>
+ false %>
</div>
<div class="form--field-instructions">
<%= t(:"meeting.email.send_invitation_emails") %>
diff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb
index 51834f2918c..a2800ec121b 100644
--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb
+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb
@@ -77,9 +77,9 @@ RSpec.describe "Structured meetings CRUD",
new_page.set_duration "1.5"
new_page.invite(other_user)
- if test.metadata[:unchecked]
- expect(page).to have_checked_field "send_notifications" # rubocop:disable RSpec/ExpectInHook
- uncheck "send_notifications"
+ if test.metadata[:checked]
+ expect(page).to have_unchecked_field "send_notifications" # rubocop:disable RSpec/ExpectInHook
+ check "send_notifications"
end
new_page.click_create
@@ -88,9 +88,9 @@ RSpec.describe "Structured meetings CRUD",
it "can create a structured meeting and add agenda items" do
show_page.expect_toast(message: "Successful creation")
- # Can send invitation mails by default
+ # Does not send invitation mails by default
perform_enqueued_jobs
- expect(ActionMailer::Base.deliveries.size).to eq 2
+ expect(ActionMailer::Base.deliveries.size).to eq 0
# Can add and edit a single item
show_page.add_agenda_item do
@@ -316,9 +316,9 @@ RSpec.describe "Structured meetings CRUD",
end
end
- it "does not send emails on creation when 'Send emails' is unchecked", :unchecked do
+ it "sends emails on creation when 'Send emails' is checked", :checked do
perform_enqueued_jobs
- expect(ActionMailer::Base.deliveries.size).to eq 0
+ expect(ActionMailer::Base.deliveries.size).to eq 2
end
context "with sections" do