Files
openproject/app/views/sharing_mailer/shared_work_package.text.erb
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

32 lines
874 B
Plaintext

<%= I18n.t("mail.salutation", user: @shared_with_user.firstname) %>
<%=
if @group
I18n.t(
"mail.sharing.work_packages.summary.group",
user: @sharer,
group: @group,
role_rights: @role_rights
)
else
I18n.t(
"mail.sharing.work_packages.summary.user",
user: @sharer,
role_rights: @role_rights
)
end
%>
<%= "-" * 100 %>
<%= "=" * ("#{@work_package.formatted_id} #{@work_package.subject}".length + 4) %>
= <%= @work_package.formatted_id %> <%= @work_package.subject %> =
<%= "=" * ("#{@work_package.formatted_id} #{@work_package.subject}".length + 4) %>
<%= I18n.t("mail.work_packages.reason.shared") %>:
<%= t("mail.sharing.work_packages.allowed_actions_html", allowed_actions: @allowed_work_package_actions.to_sentence) %>
<%= t("mail.sharing.work_packages.open_work_package") %>
<%= @url %>
<%= "-" * 100 %>