Applied rubocop.

This commit is contained in:
Martin Edenhofer 2015-09-11 10:46:53 +02:00
parent f0ed6718e8
commit ceff2cc36c
4 changed files with 7 additions and 9 deletions

View file

@ -210,7 +210,7 @@ returns
# check if min one is set to default true
def min_one_check
Calendar.all.each {|calendar|
return if calendar.default
return true if calendar.default
}
first = Calendar.order(:created_at, :id).limit(1).first
first.default = true

View file

@ -108,8 +108,8 @@ returns
self.update_time_escal_date = biz.time(pending_time, :minutes).after(update_time_escal_date)
end
end
if (!self.escalation_time && self.update_time_escal_date) || self.update_time_escal_date < self.escalation_time
self.escalation_time = self.update_time_escal_date
if (!escalation_time && update_time_escal_date) || update_time_escal_date < escalation_time
self.escalation_time = update_time_escal_date
end
# get update time in min
@ -136,10 +136,8 @@ returns
if close_time
self.close_time_in_min = pending_minutes(created_at, close_time, biz, 'business_minutes')
else
if (!self.escalation_time && self.close_time_escal_date) || self.close_time_escal_date < self.escalation_time
if !escalation_disabled
self.escalation_time = self.close_time_escal_date
end
if (!escalation_time && close_time_escal_date) || close_time_escal_date < escalation_time
self.escalation_time = close_time_escal_date
end
end

View file

@ -5,4 +5,4 @@ class UpdateSla < ActiveRecord::Migration
remove_column :slas, :data
remove_column :slas, :active
end
end
end

View file

@ -10,4 +10,4 @@ class UpdateTicketState < ActiveRecord::Migration
Ticket::State.create_or_update( id: 7, name: 'pending close', state_type_id: Ticket::StateType.find_by(name: 'pending action').id, next_state_id: 4, ignore_escalation: true )
end
end
end