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
Merge read_email_digest into sent_mail for other email reasons
Oliver Günther180594593b2d
diff --git a/app/models/user.rb b/app/models/user.rbindex 297ad7b3fd3..c92d606e594 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -75,7 +75,6 @@ class User < Principalscopes :find_by_login,:newest,- :notified_on_all,:notified_globally,:watcher_recipients,:having_reminder_mail_to_senddiff --git a/app/workers/notifications/workflow_job.rb b/app/workers/notifications/workflow_job.rbindex 818236384b0..78db85ac638 100644--- a/app/workers/notifications/workflow_job.rb+++ b/app/workers/notifications/workflow_job.rb@@ -63,6 +63,15 @@ class Notifications::WorkflowJob < ApplicationJobwait: -> { Setting.journal_aggregation_time_minutes.to_i.minutes } do |*notification_ids|next unless notification_ids+ Notification+ .where(id: notification_ids)+ .where(reason: NotificationSetting.mail_reasons)+ .each do |notification|+ Notifications::MailService+ .new(notification)+ .call+ end+Notification.where(id: notification_ids).unread_mail # TODOdiff --git a/spec/factories/user_factory.rb b/spec/factories/user_factory.rbindex 659953fdbd8..2017eb7f734 100644--- a/spec/factories/user_factory.rb+++ b/spec/factories/user_factory.rb@@ -58,7 +58,7 @@ FactoryBot.define douser.pref.save if factory.preferences.present?if user.notification_settings.empty?- all_true = NotificationSetting.all_settings.index_with(true)+ all_true = NotificationSetting.all_reasons.index_with(true)user.notification_settings = [FactoryBot.create(:notification_setting, user: user, **all_true),]diff --git a/spec/services/notifications/create_from_journal_job_shared.rb b/spec/services/notifications/create_from_journal_job_shared.rbindex 039b19da28e..d4fca20734c 100644--- a/spec/services/notifications/create_from_journal_job_shared.rb+++ b/spec/services/notifications/create_from_journal_job_shared.rb@@ -52,13 +52,13 @@ shared_context 'with CreateFromJournalJob context' doendlet(:notification_settings_all_false) doNotificationSetting- .all_settings+ .all_reasons.index_with(false)endlet(:notification_settings_all_true) doNotificationSetting- .all_settings+ .all_reasons.index_with(true)end