From 34f9ec6a66eb1a2ce739839fe59a55ecf3aa1742 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 2 Jan 2015 16:53:59 +0100 Subject: [PATCH] Small enhancements. --- .../ticket/notification/background_job.rb | 5 +-- app/models/ticket/history_log.rb | 31 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/models/observer/ticket/notification/background_job.rb b/app/models/observer/ticket/notification/background_job.rb index 0058b3d26..dffc1c6a9 100644 --- a/app/models/observer/ticket/notification/background_job.rb +++ b/app/models/observer/ticket/notification/background_job.rb @@ -40,11 +40,12 @@ class Observer::Ticket::Notification::BackgroundJob end # send notifications - recipient_list = '' + recipient_list = '' notification_subject = '' 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 diff --git a/app/models/ticket/history_log.rb b/app/models/ticket/history_log.rb index 085a5a96b..7e3ae9e3f 100644 --- a/app/models/ticket/history_log.rb +++ b/app/models/ticket/history_log.rb @@ -16,7 +16,6 @@ returns =end def history_log (type, user_id, data = {}) - data[:o_id] = self['id'] data[:history_type] = type data[:history_object] = self.class.name @@ -37,22 +36,22 @@ returns result = [ { - :type => 'created', - :object => 'Ticket', - :created_by_id => 3, - :created_at => "2013-08-19 20:41:33", + :type => 'created', + :object => 'Ticket', + :created_by_id => 3, + :created_at => "2013-08-19 20:41:33", }, { - :type => 'updated', - :object => 'Ticket', - :attribute => 'priority', - :o_id => 1, - :id_to => 3, - :id_from => 2, - :value_from => "low", - :value_to => "high", - :created_by_id => 3, - :created_at => "2013-08-19 20:41:33", + :type => 'updated', + :object => 'Ticket', + :attribute => 'priority', + :o_id => 1, + :id_to => 3, + :id_from => 2, + :value_from => "low", + :value_to => "high", + :created_by_id => 3, + :created_at => "2013-08-19 20:41:33", }, ] @@ -79,4 +78,4 @@ returns } end -end +end \ No newline at end of file