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

remove email sending delay

ulfertsd993f2fb4e00
diff --git a/app/views/admin/settings/mail_notifications_settings/show.html.erb b/app/views/admin/settings/mail_notifications_settings/show.html.erb
index 1f1e33984b8..31a6797a491 100644
--- a/app/views/admin/settings/mail_notifications_settings/show.html.erb
+++ b/app/views/admin/settings/mail_notifications_settings/show.html.erb
@@ -37,15 +37,6 @@ See COPYRIGHT and LICENSE files for more details.
<div class="form--field"><%= setting_text_field :mail_from, size: 60, container_class: '-middle' %></div>
<div class="form--field"><%= setting_check_box :bcc_recipients %></div>
<div class="form--field"><%= setting_check_box :plain_text_mail %></div>
- <div class="form--field">
- <%= setting_number_field :notification_email_delay_minutes,
- container_class: '-xslim',
- min: 0,
- unit: t(:label_minute_plural) %>
- <div class="form--field-instructions">
- <%= t(:'settings.notifications.delay_minutes_explanation') %>
- </div>
- </div>
<div class="form--field">
<%= setting_time_field :notification_email_digest_time,
container_class: '-xslim',
diff --git a/app/workers/notifications/workflow_job.rb b/app/workers/notifications/workflow_job.rb
index e562658b481..53e13fc7223 100644
--- a/app/workers/notifications/workflow_job.rb
+++ b/app/workers/notifications/workflow_job.rb
@@ -60,9 +60,7 @@ class Notifications::WorkflowJob < ApplicationJob
end
state :send_mails,
- wait: -> {
- Setting.notification_email_delay_minutes.minutes + Setting.journal_aggregation_time_minutes.to_i.minutes
- } do |*notification_ids|
+ wait: -> { Setting.journal_aggregation_time_minutes.to_i.minutes } do |*notification_ids|
next unless notification_ids
Notification
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 62534df3420..8a284a67b56 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2452,7 +2452,6 @@ en:
setting_enabled_scm: "Enabled SCM"
setting_enabled_projects_columns: "Visible in project list"
setting_notification_retention_period_days: "Notification retention period"
- setting_notification_email_delay_minutes: "Email sending delay"
setting_notification_email_digest_time: "Email digest time"
setting_feeds_enabled: "Enable Feeds"
setting_feeds_limit: "Feed content limit"
@@ -2535,7 +2534,6 @@ en:
retention_text: >
Set the number of days notification events for users (the source for in-app notifications)
will be kept in the system. Any events older than this time will be deleted.
- delay_minutes_explanation: "Email sending can be delayed to allow users with configured in app notification to confirm the notification within the application before a mail is sent out. Users who read a notification within the application will not receive an email for the already read notification."
email_digest_explanation: "Once a day, an email digest can be sent out containing a collection of all the notification users subscribed to. The setting is relative to each users configured time zone, so e.g. 8:00 will be executed at 7:00 UTC for users in UTC+1 and 9:00 UTC for those in UTC-1."
events_explanation: 'Governs for which event an email is sent out. Work packages are excluded from this list as the notifications for them can be configured specifically for every user.'
display:
diff --git a/config/settings.yml b/config/settings.yml
index 0f28c025fef..29dab8222e5 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -382,8 +382,5 @@ apiv3_docs_enabled:
notification_retention_period_days:
default: 30
format: int
-notification_email_delay_minutes:
- default: 15
- format: int
notification_email_digest_time:
default: '08:00'
diff --git a/spec/workers/notifications/workflow_job_spec.rb b/spec/workers/notifications/workflow_job_spec.rb
index 8a8a2e1cc9b..81bc37a9def 100644
--- a/spec/workers/notifications/workflow_job_spec.rb
+++ b/spec/workers/notifications/workflow_job_spec.rb
@@ -83,7 +83,6 @@ describe Notifications::WorkflowJob, type: :model do
.and_return(Time.current)
expected_time = Time.current +
- Setting.notification_email_delay_minutes.minutes +
Setting.journal_aggregation_time_minutes.to_i.minutes
expect { perform_job }