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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remember the author for sending meeting review
Oliver Günther9ab2cf258480
diff --git a/modules/meeting/app/mailers/meeting_mailer.rb b/modules/meeting/app/mailers/meeting_mailer.rbindex 6fc3cacc21a..1b76c37995a 100644--- a/modules/meeting/app/mailers/meeting_mailer.rb+++ b/modules/meeting/app/mailers/meeting_mailer.rb@@ -31,6 +31,7 @@ require 'icalendar/tzinfo'class MeetingMailer < UserMailerdef content_for_review(content, content_type, user)+ @author = User.current@meeting = content.meeting@content_type = content_typediff --git a/modules/meeting/app/views/meeting_mailer/content_for_review.html.erb b/modules/meeting/app/views/meeting_mailer/content_for_review.html.erbindex 34bc72e890a..fd703f4e074 100644--- a/modules/meeting/app/views/meeting_mailer/content_for_review.html.erb+++ b/modules/meeting/app/views/meeting_mailer/content_for_review.html.erb@@ -39,7 +39,7 @@ See COPYRIGHT and LICENSE files for more details.<p><%=raw t(:"text_review_#{@content_type}",- :author => h(User.current),+ :author => h(@author),:link => link_to(t(:"text_#{@content_type}_for_meeting",:meeting => @meeting.title),meeting_url(@meeting))) %>diff --git a/modules/meeting/app/views/meeting_mailer/content_for_review.text.erb b/modules/meeting/app/views/meeting_mailer/content_for_review.text.erbindex ebd95f7ba63..99f4305929a 100644--- a/modules/meeting/app/views/meeting_mailer/content_for_review.text.erb+++ b/modules/meeting/app/views/meeting_mailer/content_for_review.text.erb@@ -36,6 +36,6 @@ See COPYRIGHT and LICENSE files for more details.<%= Meeting.human_attribute_name(:participants_attended) %>: <%= @meeting.participants.attended.sort.join("; ") %><%=t(:"text_review_#{@content_type}",- :author => User.current,+ :author => @author,:link => t(:"text_#{@content_type}_for_meeting",:meeting => @meeting.title) + " (#{meeting_url(@meeting)})") %>diff --git a/modules/meeting/spec/mailers/meeting_mailer_spec.rb b/modules/meeting/spec/mailers/meeting_mailer_spec.rbindex 009dd008c85..92d54379039 100644--- a/modules/meeting/spec/mailers/meeting_mailer_spec.rb+++ b/modules/meeting/spec/mailers/meeting_mailer_spec.rb@@ -50,6 +50,8 @@ describe MeetingMailer, type: :mailer doendbefore do+ User.current = author+meeting.participants.merge([meeting.participants.build(user: watcher1, invited: true, attended: false),meeting.participants.build(user: watcher2, invited: true, attended: false)])meeting.save!@@ -159,7 +161,9 @@ describe MeetingMailer, type: :mailer doit 'renders the mail with the correcet locale' doexpect(mail.text_part.body).to include('01/19/2021 07:00 PM-08:00 PM (GMT+09:00) Asia/Tokyo')+ expect(mail.text_part.body).to include("#{author.name} has put the")expect(mail.html_part.body).to include('01/19/2021 07:00 PM-08:00 PM (GMT+09:00) Asia/Tokyo')+ expect(mail.html_part.body).to include("#{author.name} has put the")expect(mail.to).to match_array([watcher1.mail])end