sla.rb 461 B

1234567891011121314151617
  1. # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
  2. class Sla < ApplicationModel
  3. store :condition
  4. store :data
  5. validates :name, :presence => true
  6. after_create :escalation_calculation_rebuild
  7. after_update :escalation_calculation_rebuild
  8. after_destroy :escalation_calculation_rebuild
  9. private
  10. def escalation_calculation_rebuild
  11. Cache.delete( 'SLA::List::Active' )
  12. Ticket::Escalation.rebuild_all
  13. end
  14. end