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
Remove all option in watcher job spec
Oliver Günther5e8d9867c1ea
diff --git a/app/workers/mails/watcher_job.rb b/app/workers/mails/watcher_job.rbindex 3d1927f4185..545f8469af6 100644--- a/app/workers/mails/watcher_job.rb+++ b/app/workers/mails/watcher_job.rb@@ -61,10 +61,9 @@ class Mails::WatcherJob < Mails::DeliverJob.user.notification_settings.applicable(watcher.watchable.project).first- settings.watched || settings.all+ settings.watchedenddef self_watching?diff --git a/spec/workers/mails/shared/watcher_job.rb b/spec/workers/mails/shared/watcher_job.rbindex 7eac88f49fd..30d2aff1df4 100644--- a/spec/workers/mails/shared/watcher_job.rb+++ b/spec/workers/mails/shared/watcher_job.rb@@ -46,7 +46,7 @@ shared_examples "watcher job" do |action|FactoryBot.build_stubbed(:user_preference)endlet(:notification_settings) do- [FactoryBot.build_stubbed(:notification_setting, all: true)]+ [FactoryBot.build_stubbed(:notification_setting)]endlet(:watching_user) doFactoryBot.build_stubbed(:user,@@ -58,10 +58,6 @@ shared_examples "watcher job" do |action|allow(notification_settings).to receive(:applicable).and_return(notification_settings)-- allow(notification_settings)- .to receive(:mail)- .and_return(notification_settings)endend@@ -132,7 +128,7 @@ shared_examples "watcher job" do |action|it_behaves_like 'notifies the watcher' dolet(:notification_settings) do- [FactoryBot.build_stubbed(:notification_setting, mentioned: false, involved: false, watched: false, all: true)]+ [FactoryBot.build_stubbed(:notification_setting, mentioned: false, involved: false, watched: true)]endend