237 Commits

Author SHA1 Message Date
Kabiru Mwenja b2d93c3a00 Use semantic work package identifier in sharing email links
The shared-work-package email built its "Open work package" link and its
text-part heading from the numeric primary key, so recipients on a
semantic-identifier instance still landed on /work_packages/<numeric-id>
rather than the semantic URL.

Pass the work package itself to the URL helper so to_param yields the
display id, and render the text heading with formatted_id to match the
other work package mailers. Also drops an unused @notification_url that
carried the same numeric-id problem.

STC-747
2026-06-02 09:55:45 +03:00
Kabiru Mwenja 499d7820a2 Add render_mode flag and MailFormattingHelper
`format_text` accepts `render_mode:` (`:in_app_html`, `:external_html`,
`:external_text`), which resolves the `only_path`, `static_html` and
`plain_text` context flags as a set. External surfaces (mailer HTML
body, future RSS/PDF/webhook) need absolute URLs and static rendering
together; pinning the trio at the public API keeps callers from
forgetting one. Explicit primitive kwargs still override.

`MailFormattingHelper` exposes `format_mail_html` and `format_mail_text`
thin wrappers around `format_text(render_mode:)`. The `_html` / `_text`
suffix matches the `.html.erb` / `.text.erb` template extension so
caller intent stays visible in the view, with no introspection of
`formats`.

The five WorkPackageMailer view sites use the helpers; `_work_package_details`,
`mentioned.html`, `mentioned.text`, `watcher_changed.html`, `watcher_changed.text`
drop the `static_html:`/`only_path:`/`plain_text:` boilerplate.
2026-05-27 13:04:26 +03:00
Judith Roth 2efc96504a [#73827] Adapt email notifications for project-based work package identifiers
https://community.openproject.org/wp/73827
2026-05-05 10:47:39 +02:00
Henriette Darge ff4bbd9437 [74342] Issues in work package sharing notification email (#22918)
* Escape sharing info in mail correctly

* Localize the shared permissions in the mail

* Replace custom method with builtin `to_sentence`

* Restructure sentence and use verbs explicitly for better wording in other languages
2026-04-30 11:11:41 +02:00
Markus Kahl c1bf546c30 add pointer to which IP address ranges are blocked by SSRF protection 2026-03-09 12:56:55 +00:00
Markus Kahl 9e7833ce46 prevent timing attacks in ssrf protected test email 2026-03-09 12:27:54 +00:00
ulferts e47e387196 merge ProjectHelper into ProjectsHelper 2026-02-27 15:58:04 +01:00
Oliver Günther 6fc97cf04f Add PIR submission email 2025-11-26 16:40:00 +01:00
Mir Bhatia b74d2cfb30 Update email layout and add default text 2025-11-24 18:13:10 +01:00
Mir Bhatia fd3d6acea5 Update new_project_service to send out mails 2025-11-24 18:13:08 +01:00
OpenProject Actions CI 4e57cfe50a Merge branch 'release/16.6' into dev 2025-11-03 12:56:38 +00:00
Oliver Günther 623f1d3066 Remove name part of reply_to address
https://community.openproject.org/work_packages/68659
2025-11-03 09:20:27 +01:00
Oliver Günther c1e12729b0 Merge remote-tracking branch 'origin/release/16.6' into dev 2025-10-31 10:42:37 +01:00
Kabiru Mwenja 6c7687164b [rubocop] Extra empty line detected at class body beginning. 2025-10-30 16:30:19 +03:00
Oliver Günther fe7a04f729 Also expose reply_to, which contains token 2025-10-30 09:27:12 +01:00
Oliver Günther d0801dd060 Use ApplicationMailer.mail_from in more places
It is defined by SaaS to use the reply_token, which fails otherwise
2025-10-29 15:53:06 +01:00
Ivan Kuchin d7aec46d9f get rid of with_deliveries method
It was setting ActionMailer::Base.perform_deliveries for the duration of
the block, but perform_deliveries is a class attribute, so not thread
local and doesn't work as expected in combination with setting
perform_deliveries to true when calling
Setting::MailSettings#reload_mailer_settings! at the start of every
request and every job run
2025-10-02 14:10:40 +02:00
Pavel Balashou 1323927095 [#65068] Add deleted status to user.
https://community.openproject.org/work_packages/65068
2025-08-27 09:53:37 +02:00
Alexander Brandon Coles b0d87f47df Fix missing copyright notices in app/mailers 2025-08-19 17:01:08 +01:00
Alexander Brandon Coles 4cdb06084f Freeze string literals in app/mailers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/mailers
2025-08-19 17:01:08 +01:00
Kabiru Mwenja 0d7ebce603 implementation/60342 Update reminder email subject to include the note (#17504)
https://community.openproject.org/work_packages/60342

Reminder email template will be redesigned to differentiate from notifications. In the meantime,
we add the note or work package subject in the email subject as a tiny enhancements.
2024-12-19 15:24:14 +03:00
Kabiru Mwenja 2e5a638db9 Define reminder notification mailer template 2024-12-17 14:14:31 +03:00
Oliver Günther 32d4da11a0 Fix and add test for self-registration 2024-10-21 13:03:52 +02:00
Henriette Darge 405789729a Redirect to Activity tab in the notification emails (like it was before the refactoring of the notification center) 2024-09-09 07:26:23 +02:00
ulferts 80408a5827 Merge remote-tracking branch 'origin/release/14.4' into dev 2024-08-23 08:51:14 +02:00
ulferts eb98b082a0 remove explicit project column from notifications 2024-08-22 10:07:15 +02:00
Oliver Günther 12ee9e6b83 Merge remote-tracking branch 'origin/idea/56781-remove-years-from-copyrights' into dev 2024-08-06 10:17:59 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther ef9480bbd6 Use menu helper to generate tabs 2024-07-26 10:32:10 +02:00
Oliver Günther 0558a77bdc Resolve urls in mail helpers 2024-07-26 10:32:08 +02:00
Klaus Zanders 72809b1b7d More i18n string changes 2024-06-27 09:51:27 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +02:00
Markus Kahl 2c28952aee add comment explaining change to mail API 2024-05-10 11:48:00 +01:00
Markus Kahl d2fa7af13d restore previous behaviour in mailer override for the time being to fix specs 2024-05-07 14:44:59 +01:00
Oliver Günther 348b6fc694 Use compatible method with saas patch 2024-05-07 15:03:46 +02:00
Oliver Günther fed9579684 Avoid sending mails to locked users 2024-05-06 19:10:42 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Oliver Günther f3deadf4de Fix translated mail subject lines
https://community.openproject.org/work_packages/52976
2024-03-05 09:53:35 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther 01cbb3ef1a Fix activation of invited users during sharing
https://community.openproject.org/work_packages/51262
2023-12-07 14:23:05 +01:00
Oliver Günther feb3edff13 Store salutation as setting to make it reusable 2023-11-02 19:41:35 +01:00
Oliver Günther c5c52d7959 Implement previewable scheduled meeting mailer based on common layout 2023-10-31 16:19:41 +01:00
Aaron Contreras c1e79db06b Enqueue emails for Group shares 2023-10-16 09:47:00 -05:00
Aaron Contreras ec5481a056 Add text-version of shared_work_package email 2023-09-27 09:09:08 -05:00
Aaron Contreras 5d624a1941 Rework email design to adapt to existing styles 2023-09-27 08:42:06 -05:00
Aaron Contreras d520f40f33 Add Mail Headers to shared_work_package mail 2023-09-26 18:07:59 -05:00
Aaron Contreras bbbbf1b7ae Create shared_work_package mail body 2023-09-26 18:07:59 -05:00