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

construct read_ian condition in unsent_reminders_before not as an SQL fragment

Ivan Kuchinfcfc97f9c426
diff --git a/app/models/notifications/scopes/unsent_reminders_before.rb b/app/models/notifications/scopes/unsent_reminders_before.rb
index 7fb88148210..75654bc6a45 100644
--- a/app/models/notifications/scopes/unsent_reminders_before.rb
+++ b/app/models/notifications/scopes/unsent_reminders_before.rb
@@ -36,7 +36,7 @@ module Notifications::Scopes
def unsent_reminders_before(recipient:, time:)
where(Notification.arel_table[:created_at].lteq(time))
.where(recipient:)
- .where("read_ian IS NULL OR read_ian IS FALSE")
+ .where(read_ian: [false, nil])
.where(mail_reminder_sent: false)
end
end