diff --git a/app/services/notifications/journal_wp_mail_service.rb b/app/services/notifications/journal_wp_mail_service.rb index cb8752cb49..0561f869bb 100644 --- a/app/services/notifications/journal_wp_mail_service.rb +++ b/app/services/notifications/journal_wp_mail_service.rb @@ -67,10 +67,10 @@ class Notifications::JournalWPMailService potential_text << journal.notes if journal.try(:notes) %i[description subject].each do |field| - if journal.details[field].try(:any?) - from = journal.details[field].first - to = journal.details[field].second - potential_text << "\n" + Redmine::Helpers::Diff.new(to, from).additions.join(' ') + details = journal.details[field] + + if details.present? + potential_text << "\n" + Redmine::Helpers::Diff.new(*details).additions.join(' ') end end potential_text