diff --git a/app/models/observer/ticket/notification/background_job.rb b/app/models/observer/ticket/notification/background_job.rb index c285f05c1..49bc28538 100644 --- a/app/models/observer/ticket/notification/background_job.rb +++ b/app/models/observer/ticket/notification/background_job.rb @@ -292,7 +292,7 @@ State: i18n(#{ticket.state.name.text2html})

' end if user.preferences[:locale] =~ /^de/i - subject = 'Ticket aktualisiert (#{ticket.title.text2html})' + subject = 'Ticket aktualisiert (#{ticket.title})' body = '
Hallo #{recipient.firstname.text2html},

@@ -309,7 +309,7 @@ Ticket (#{ticket.title.text2html}) wurde von "#{ticket.updated_by.fullname.te
' else - subject = 'Updated Ticket (#{ticket.title.text2html})' + subject = 'Updated Ticket (#{ticket.title})' body = '
Hi #{recipient.firstname.text2html},

diff --git a/test/unit/ticket_notification_test.rb b/test/unit/ticket_notification_test.rb index 27018e0f2..18c3219e1 100644 --- a/test/unit/ticket_notification_test.rb +++ b/test/unit/ticket_notification_test.rb @@ -364,7 +364,7 @@ class TicketNotificationTest < ActiveSupport::TestCase # create ticket in group ticket1 = Ticket.create( - :title => 'some notification template test 1', + :title => 'some notification template test 1 Bobs\'s resumé', :group => Group.lookup( :name => 'Users'), :customer => customer, :state => Ticket::State.lookup( :name => 'new' ), @@ -413,6 +413,16 @@ class TicketNotificationTest < ActiveSupport::TestCase assert_match( /updated/i, template[:subject] ) # en notification + subject = NotificationFactory.build( + :locale => agent2.preferences[:locale], + :string => template[:subject], + :objects => { + :ticket => ticket1, + :article => article, + :recipient => agent2, + } + ) + assert_match( /Bobs's resumé/, subject ) body = NotificationFactory.build( :locale => agent2.preferences[:locale], :string => template[:body], @@ -430,6 +440,8 @@ class TicketNotificationTest < ActiveSupport::TestCase # de template template = bg.template_update(agent1, ticket1, article, human_changes) assert( template[:subject] ) + assert( template[:subject] ) + assert_match( /Bobs's resumé/, template[:subject] ) assert( template[:body] ) assert_match( /Priority/, template[:body] ) assert_match( /1 low/, template[:body] ) @@ -437,6 +449,16 @@ class TicketNotificationTest < ActiveSupport::TestCase assert_match( /aktualis/, template[:subject] ) # de notification + subject = NotificationFactory.build( + :locale => agent1.preferences[:locale], + :string => template[:subject], + :objects => { + :ticket => ticket1, + :article => article, + :recipient => agent2, + } + ) + assert_match( /Bobs's resumé/, subject ) body = NotificationFactory.build( :locale => agent1.preferences[:locale], :string => template[:body],