diff --git a/app/views/mailer/application.html.erb b/app/views/mailer/application.html.erb index 3c5d5d262..61daf3ccb 100644 --- a/app/views/mailer/application.html.erb +++ b/app/views/mailer/application.html.erb @@ -38,5 +38,5 @@ <%= d 'message', false %>
\ No newline at end of file diff --git a/app/views/mailer/ticket_create/de.html.erb b/app/views/mailer/ticket_create/de.html.erb index 5d5c07a02..a257d2aac 100644 --- a/app/views/mailer/ticket_create/de.html.erb +++ b/app/views/mailer/ticket_create/de.html.erb @@ -14,7 +14,7 @@ Neues Ticket (<%= d 'ticket.title' %>)<%= t 'Information' %>:
- <%= d('article.body').text2html %> + <%= a 'article' %><% end %> diff --git a/app/views/mailer/ticket_create/en.html.erb b/app/views/mailer/ticket_create/en.html.erb index 78dda990c..d1569f20c 100644 --- a/app/views/mailer/ticket_create/en.html.erb +++ b/app/views/mailer/ticket_create/en.html.erb @@ -14,7 +14,7 @@ New Ticket (<%= d 'ticket.title' %>)
<%= t 'Information' %>:
- <%= d('article.body').text2html %> + <%= a 'article' %><% end %> diff --git a/app/views/mailer/ticket_update/en.html.erb b/app/views/mailer/ticket_update/en.html.erb index e8ac7cd50..e62b58381 100644 --- a/app/views/mailer/ticket_update/en.html.erb +++ b/app/views/mailer/ticket_update/en.html.erb @@ -19,7 +19,7 @@ Ticket (<%= d 'ticket.title' %>) has been updated by "<%= d 'ticket.updated_b
<%= t 'Information' %>:
- <%= d('article.body').text2html %> + <%= a 'article' %><% end %> diff --git a/lib/notification_factory.rb b/lib/notification_factory.rb index 5293530f8..41141b8e5 100644 --- a/lib/notification_factory.rb +++ b/lib/notification_factory.rb @@ -297,7 +297,7 @@ module NotificationFactory if content_type =~ /html/ return d "#{article}.body", false end - d("#{article}.content_type", false).text2html + d("#{article}.body", false).text2html end def h(key) diff --git a/test/unit/notification_factory_test.rb b/test/unit/notification_factory_test.rb index b6c03e5a3..277e083b1 100644 --- a/test/unit/notification_factory_test.rb +++ b/test/unit/notification_factory_test.rb @@ -356,8 +356,29 @@ next line, Group: Users', assert_match('Notification<b>xxx</b>', result[:body]) assert_no_match('Dein', result[:body]) - ticket = Ticket.first - article = ticket.articles.first + ticket = Ticket.create( + group_id: Group.where( name: 'Users' ).first.id, + customer_id: User.where( login: 'nicole.braun@zammad.org' ).first.id, + owner_id: User.where( login: '-' ).first.id, + title: 'Welcome to Zammad!', + state_id: Ticket::State.where( name: 'new' ).first.id, + priority_id: Ticket::Priority.where( name: '2 normal' ).first.id, + updated_by_id: 1, + created_by_id: 1, + ) + article = Ticket::Article.create( + ticket_id: ticket.id, + type_id: Ticket::Article::Type.where(name: 'phone' ).first.id, + sender_id: Ticket::Article::Sender.where(name: 'Customer' ).first.id, + from: 'Zammad Feedback