Small enhancements.

This commit is contained in:
Martin Edenhofer 2015-01-02 16:53:59 +01:00
parent 464673594c
commit 34f9ec6a66
2 changed files with 18 additions and 18 deletions

View file

@ -40,11 +40,12 @@ class Observer::Ticket::Notification::BackgroundJob
end end
# send notifications # send notifications
recipient_list = '' recipient_list = ''
notification_subject = '' notification_subject = ''
recipients.each do |user| recipients.each do |user|
next if ticket.updated_by_id == ticket.owner_id next if ticket.updated_by_id == user.id
next if !user.active
# create desktop notification # create desktop notification

View file

@ -16,7 +16,6 @@ returns
=end =end
def history_log (type, user_id, data = {}) def history_log (type, user_id, data = {})
data[:o_id] = self['id'] data[:o_id] = self['id']
data[:history_type] = type data[:history_type] = type
data[:history_object] = self.class.name data[:history_object] = self.class.name
@ -37,22 +36,22 @@ returns
result = [ result = [
{ {
:type => 'created', :type => 'created',
:object => 'Ticket', :object => 'Ticket',
:created_by_id => 3, :created_by_id => 3,
:created_at => "2013-08-19 20:41:33", :created_at => "2013-08-19 20:41:33",
}, },
{ {
:type => 'updated', :type => 'updated',
:object => 'Ticket', :object => 'Ticket',
:attribute => 'priority', :attribute => 'priority',
:o_id => 1, :o_id => 1,
:id_to => 3, :id_to => 3,
:id_from => 2, :id_from => 2,
:value_from => "low", :value_from => "low",
:value_to => "high", :value_to => "high",
:created_by_id => 3, :created_by_id => 3,
:created_at => "2013-08-19 20:41:33", :created_at => "2013-08-19 20:41:33",
}, },
] ]