time_based_trigger.rb 368 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Transaction::TimeBasedTrigger < Transaction::Trigger
  3. def perform
  4. return if !time_based_trigger?
  5. super
  6. end
  7. private
  8. def trigger_activator
  9. :time
  10. end
  11. def time_based_trigger?
  12. %w[reminder_reached escalation escalation_warning].include? @item[:type]
  13. end
  14. end