ticket.rb 436 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SystemReport::Plugin::Entities::Ticket < SystemReport::Plugin
  3. DESCRIPTION = __('Open and closed tickets ratio (ticket counts based on state)').freeze
  4. def fetch
  5. {
  6. 'Open' => Ticket.where(state_id: Ticket::State.by_category(:open)).count,
  7. 'Closed' => Ticket.where(state_id: Ticket::State.by_category(:closed)).count,
  8. }
  9. end
  10. end