Improved notifications.

This commit is contained in:
Martin Edenhofer 2012-05-02 13:47:35 +02:00
parent 031ed7cc1e
commit 36de5d809b

View file

@ -29,7 +29,10 @@ class Ticket::Observer::Notification < ActiveRecord::Observer
:subject => 'New Ticket (#{ticket.title})',
:body => 'Hi #{recipient.firstname},
a new Ticket (#{ticket.title}) in Group #{ticket.group.name}, owned by #{ticket.owner.firstname} #{ticket.owner.lastname}
a new Ticket (#{ticket.title}) via #{article.ticket_article_type.name}.
Group: #{ticket.group.name}
Owner: #{ticket.owner.firstname} #{ticket.owner.lastname}
From: #{article.from}
<snip>
@ -79,7 +82,7 @@ Your Zammad Team
if event[:name] == 'Ticket::Article' && event[:type] == 'create'
# only send article notifications after init article is created (handled by ticket create event)
next if ticket.articles.count >= 1
next if ticket.articles.count.to_i <= 1
puts 'send new ticket::article notify'
@ -91,7 +94,10 @@ Your Zammad Team
:subject => 'Follow Up (#{ticket.title})',
:body => 'Hi #{recipient.firstname},
a follow Up (#{ticket.title}) in Group #{ticket.group.name}, owned by #{ticket.owner.firstname} #{ticket.owner.lastname}
a follow Up (#{ticket.title}) via #{article.ticket_article_type.name}.
Group: #{ticket.group.name}
Owner: #{ticket.owner.firstname} #{ticket.owner.lastname}
From: #{article.from}
<snip>
@ -116,7 +122,10 @@ From: #{article.from}
:subject => 'Updated (#{ticket.title})',
:body => 'Hi #{recipient.firstname},
Updated (#{ticket.title}) in Group #{ticket.group.name}, owned by #{ticket.owner.firstname} #{ticket.owner.lastname}
updated (#{ticket.title}) via #{article.ticket_article_type.name}.
Group: #{ticket.group.name}
Owner: #{ticket.owner.firstname} #{ticket.owner.lastname}
From: #{article.from}
<snip>