trabajo-afectivo/app/models/sla.rb

18 lines
461 B
Ruby
Raw Normal View History

2014-02-03 19:23:00 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
2013-02-01 08:53:14 +00:00
class Sla < ApplicationModel
store :condition
store :data
validates :name, :presence => true
2013-03-07 07:13:56 +00:00
2013-03-07 10:34:42 +00:00
after_create :escalation_calculation_rebuild
after_update :escalation_calculation_rebuild
after_destroy :escalation_calculation_rebuild
2013-03-07 07:13:56 +00:00
private
def escalation_calculation_rebuild
Cache.delete( 'SLA::List::Active' )
2013-08-16 18:35:49 +00:00
Ticket::Escalation.rebuild_all
end
end