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

fix url for notification center in case of a show all

ulfertseb359e4dcf50
diff --git a/app/views/digest_mailer/work_packages.html.erb b/app/views/digest_mailer/work_packages.html.erb
index 802f6f887ac..32965e9394d 100644
--- a/app/views/digest_mailer/work_packages.html.erb
+++ b/app/views/digest_mailer/work_packages.html.erb
@@ -60,7 +60,7 @@
<table <%= placeholder_table_styles %>>
<tr>
<td style="background: #D1E5F5; padding: 8px 12px; border: 1px solid #1A67A3; border-radius: 16px; overflow: hidden; text-overflow: ellipsis;">
- <a href="<%= notifications_path %>"
+ <a href="<%= notifications_url %>"
target="_blank"
style="color: #1A67A3; text-decoration: none; font-size: 14px;white-space: nowrap;">
<%= I18n.t(:'mail.work_packages.see_all') %>
diff --git a/spec/mailers/digest_mailer_spec.rb b/spec/mailers/digest_mailer_spec.rb
index 6b6b4d9fba2..4dabc26717c 100644
--- a/spec/mailers/digest_mailer_spec.rb
+++ b/spec/mailers/digest_mailer_spec.rb
@@ -120,6 +120,16 @@ RSpec.describe DigestMailer do
.to have_text(expected_text, normalize_ws: true)
end
+ it "includes a reference to the notification center if there are more than the maximum number of shown work packages" do
+ stub_const("DigestMailer::MAX_SHOWN_WORK_PACKAGES", 0)
+
+ expect(mail_body)
+ .to have_text I18n.t(:"mail.work_packages.more_to_see.one")
+
+ expect(mail_body)
+ .to have_link(I18n.t(:"mail.work_packages.see_all"), href: notifications_url)
+ end
+
context "with only a deleted work package for the digest" do
let(:work_package) { nil }