Applied rubocop.
This commit is contained in:
parent
f0ed6718e8
commit
ceff2cc36c
4 changed files with 7 additions and 9 deletions
|
@ -210,7 +210,7 @@ returns
|
||||||
# check if min one is set to default true
|
# check if min one is set to default true
|
||||||
def min_one_check
|
def min_one_check
|
||||||
Calendar.all.each {|calendar|
|
Calendar.all.each {|calendar|
|
||||||
return if calendar.default
|
return true if calendar.default
|
||||||
}
|
}
|
||||||
first = Calendar.order(:created_at, :id).limit(1).first
|
first = Calendar.order(:created_at, :id).limit(1).first
|
||||||
first.default = true
|
first.default = true
|
||||||
|
|
|
@ -108,8 +108,8 @@ returns
|
||||||
self.update_time_escal_date = biz.time(pending_time, :minutes).after(update_time_escal_date)
|
self.update_time_escal_date = biz.time(pending_time, :minutes).after(update_time_escal_date)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (!self.escalation_time && self.update_time_escal_date) || self.update_time_escal_date < self.escalation_time
|
if (!escalation_time && update_time_escal_date) || update_time_escal_date < escalation_time
|
||||||
self.escalation_time = self.update_time_escal_date
|
self.escalation_time = update_time_escal_date
|
||||||
end
|
end
|
||||||
|
|
||||||
# get update time in min
|
# get update time in min
|
||||||
|
@ -136,10 +136,8 @@ returns
|
||||||
if close_time
|
if close_time
|
||||||
self.close_time_in_min = pending_minutes(created_at, close_time, biz, 'business_minutes')
|
self.close_time_in_min = pending_minutes(created_at, close_time, biz, 'business_minutes')
|
||||||
else
|
else
|
||||||
if (!self.escalation_time && self.close_time_escal_date) || self.close_time_escal_date < self.escalation_time
|
if (!escalation_time && close_time_escal_date) || close_time_escal_date < escalation_time
|
||||||
if !escalation_disabled
|
self.escalation_time = close_time_escal_date
|
||||||
self.escalation_time = self.close_time_escal_date
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,4 @@ class UpdateSla < ActiveRecord::Migration
|
||||||
remove_column :slas, :data
|
remove_column :slas, :data
|
||||||
remove_column :slas, :active
|
remove_column :slas, :active
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 )
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue