169 Commits

Author SHA1 Message Date
OpenProject Actions CI 13c2ee75ba Merge branch 'release/17.5' into dev 2026-06-03 12:57:00 +00:00
Kabiru Mwenja 0d3c2850c9 Resolve notification email links to the semantic identifier too
The notification-row partial and the mention email's "see in center"
button built their /notifications/details/<id> links from the numeric
primary key, so mention, digest and reminder emails still linked to the
numeric URL on a semantic-identifier instance.

The split view already resolves the id through find_by_display_id, which
accepts both the numeric id and the semantic identifier, so handing it
the work package lets to_param render the display id. Also drops the
unused split_view_work_package_id helper, whose to_i wrongly suggested
the route only accepts a numeric id.
2026-06-02 10:18:30 +03:00
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 f12fc7551f Migrate remaining mailers to format_mail_html / format_mail_text (#23387)
The view-helper migration introduced by the parent PR now covers the
remaining mailer surfaces: UserMailer (`message_posted`, `news_added`,
`news_comment_added`), ProjectMailer (`project_created`),
ProjectArtifactsMailer (`creation_wizard_submitted`), MemberMailer
(`added_project`, `updated_project`, `updated_global`), AnnouncementMailer
(`announce`), DocumentsMailer (`document_added`), and the shared mailer
layout (`localized_emails_header`, `localized_emails_footer`).

Sites drop the `static_html: true` / `only_path: false` / `plain_text: true`
boilerplate; `render_mode:` pinning lives in the helper.

The layout previously called `OpenProject::TextFormatting::Renderer.format_text`
directly, bypassing the helper layer. The empty visibility cache (no
current_user-scoped preload at layout time) is handled by the existing
fallback in `LinkHandlers::WorkPackages#text_only?` — covered by a new
sanity spec in `user_mailer_spec.rb` that exercises the header path with
a WP reference and asserts plain-text formatted_id rendering.

Per-bucket regression coverage added: absolute-URL and formatted_id
assertions across both classic and semantic identifier modes, mirroring
the WorkPackageMailer spec pattern.
2026-05-28 12:48:43 +03:00
Kabiru Mwenja 23d52fcf1c Drop semantic_work_package_ids flag annotations
The feature flag is gone on release/17.5 (PR #23324); the
`with_settings: { work_packages_identifier: ... }` annotation alone
is enough to pin classic vs semantic behaviour in each context.
2026-05-26 14:24:03 +03:00
Kabiru Mwenja ee4c9aee59 Render WP quickinfo macros as static HTML in mailer notes
The `##N` and `###N` work-package macros emit JS-hydrated
`<opce-macro-wp-quickinfo>` custom elements, which mail clients
collapse to empty bullets. Introduce a `:markdown_as_static_html`
format that shares the rich filter chain but signals
`context[:as_static_html]` so the matcher and `MentionFilter` emit a
server-rendered anchor — formatted_id, type name, subject, and (for
`###`) status name — closely mirroring the in-app widget once
flattened.

Mailer HTML templates (`mentioned`, `watcher_changed`,
`_work_package_details`) opt into the new format. Invisible WPs still
render as plain-text labels, matching the cross-project visibility
policy.

`ResourceLinksMatcher.build_cache` and
`MentionFilter#preload_work_package_mentions` eager-load `:type` and
`:status` only when `:as_static_html` is set, leaving the default web
path's two-SELECT shape untouched. Classic-mode preload now also runs
under `:as_static_html` so the link handler can resolve type/subject
for `##`/`###`.

Renames the internal flag `context[:plain_text]` to `context[:as_text]`
to restore symmetry with the user-facing `:markdown_as_text` format.
2026-05-26 14:19:23 +03:00
Kabiru Mwenja 878048f8e8 Resolve WP labels across visibility boundaries in text macros
The macro preload was visibility-scoped — references to work packages the
recipient cannot see would fall through to the literal `#43` shape, even
when the same reference rendered as `DCP-1` for an author with full view
permission. Notification recipients saw misleading numeric ids for cross-
project references in journal notes.

Splits label resolution from link gating:

- `ResourceLinksMatcher.build_lookup` now does an unscoped fetch for the
  primary identifier and a separate visibility-scoped id pluck. The link
  handler reads `visible_to_current_user?` to decide between a navigable
  anchor and a plain-text label.
- `UpdateAncestorsService#set_journal_note` writes `#display_id` so new
  notes carry the semantic shape at the source; render-time resolution
  heals legacy `#N` content for users with view permission.

Tradeoff: a recipient without view permission now sees the WP's semantic
identifier (e.g. `DCP-1`) as plain text rather than `#43`. The reference's
existence was already disclosed by the stored journal text; the project
identifier is the only new piece of information surfaced, and is not
treated as a secret elsewhere in the system (URLs, exports, API).
2026-05-26 14:18:48 +03:00
Kabiru Mwenja 7c9d15e506 Render WP identifiers per current mode in plain-text mailer notes
The `mentioned` and `watcher_changed` text-mailer bodies surfaced raw
journal markdown — numeric `#42` references stayed numeric in semantic
mode, and `<mention>` envelopes leaked as HTML source.

Introduces `:plain_text` as a sibling format inside the existing Plain
module. The filter chain mirrors the markdown pipeline (markdown,
sanitization, mention, pattern-matcher) and finishes with a new
`PlainTextOutputFilter` that collapses the DOM to text. The
`WorkPackages` link handler and `MentionFilter` get plain-text branches
keyed off `context[:plain_text]` so identifier resolution stays in one
place across rich and plain channels.

Closes https://community.openproject.org/wp/74762
2026-05-26 14:18:17 +03:00
Tomas Hykel 948fa43321 chore: Remove feature flag for project-based work package identifiers 2026-05-25 17:45:06 +02: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
Oliver Günther fc46248719 Merge pull request #22720 from opf/refactor/remove-scheduled-meetings
- Tracking the cancelled state of a meeting

- Tracking meetings that are changed from their canonical recurrence-id (e.g., moved to a later date)

- Don't deleted cancelled meetings
2026-04-21 16:45:43 +02:00
OpenProject Actions CI 5e9e1f00df Merge branch 'release/17.1' into dev 2026-02-17 04:18:29 +00:00
OpenProject Actions CI 0d64a0f97e Merge branch 'release/17.0' into release/17.1 2026-02-16 19:06:28 +00:00
Oliver Günther 281a89eed7 Fix link in activation limit reached email 2026-02-16 20:05:47 +01:00
Klaus Zanders 538b3cd29b Merge branch 'dev' into more-visible-scopes 2026-02-12 11:19:23 +01:00
Klaus Zanders de3fd5fd74 Fix more tests and wrong links after refactoring 2026-02-09 15:08:13 +01:00
ulferts 3fb692d36b adapt specs to changes in 8.1 2026-02-06 15:58:47 +01:00
ulferts 93d007f7a6 fix spec expectation 2026-01-28 15:24:13 +01:00
Alexander Brandon Coles e2dd0fdb85 [#69927] Fix "since X days" on Notifications page
This should read "for X days" in English.

https://community.openproject.org/work_packages/69927
2025-12-12 11:50:27 -03:00
Oliver Günther 6fc97cf04f Add PIR submission email 2025-11-26 16:40:00 +01:00
Mir Bhatia 103ce1b468 Add and fix specs 2025-11-25 09:02:11 +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
Christophe Bliard 55017bffbe Merge branch 'dev' into merge-release/16.5-20251015034226 2025-10-15 14:55:16 +02:00
Oliver Günther 6754f26b07 Send invites on meeting templates when scheduled meetings exist 2025-10-14 16:22:53 +02: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 e78b12a51e [#62107] Fix specs. Add openjdk to backend image.
- Add openjdk to backend image.
  It is required to sping up test LDAP server in specs.
  https://github.com/NUARIG/ladle
2025-06-30 17:50:39 +02:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Alexander Brandon Coles 7a5124522c Fix typo in user_format: s/coma/comma/ 2025-02-14 07:27:08 -03:00
Oliver Günther 63e5e52524 Fix recurring meetings not receiving rescheduled mails 2025-02-12 08:28:37 +01:00
Oliver Günther 73200f0fd0 Ensure we send an email when meetings get cancelled 2025-02-11 13:34:36 +01:00
Oliver Günther 156794fa67 Send out mail when recurring meeting template completed (#17492)
* ICS improvements for meeting occurrences

* Add series mailer implementation

* Change sequence to lock_version

* Set filename to occurrence if present

* Refactor occurence to use actual meeting
2025-01-27 20:23:00 +01:00
Kabiru Mwenja ff927b717e Add missing full stops in date alerts bottom texts 2025-01-15 16:22:02 +03: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
ulferts eb359e4dcf fix url for notification center in case of a show all 2024-10-22 16:41:39 +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 9586b06db3 Merge pull request #16331 from opf/chore/verify_partial_doubles
Set verify_partial_doubles=true
2024-08-06 10:54:18 +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
Oliver Günther 1df0c00c2a Adapt affected specs to opt-out of double verification 2024-08-05 19:31:30 +02:00
Oliver Günther 873f9e8035 Use standard format_time with digest mailer 2024-08-05 19:11:31 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +02:00
Oliver Günther fed9579684 Avoid sending mails to locked users 2024-05-06 19:10:42 +02:00
Kabiru Mwenja 9a066dca55 chore[Op#54140]: Add storages mailer preview 2024-04-12 11:38:20 +03: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
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