Ticket StateType id not found, therefore cannot be deleted


  • Used Zammad version: zammad 5.0.3-1640164755.9ed29355.bionic
  • Used Zammad installation type: package
  • Operating system: Ubuntu 18.04.6 LTS
  • Browser + version: All

Expected behavior:

  • find Ticket StateType id for for ticket state created via rails console
  • delete ticket status as it is not used

Actual behavior:

  • cannot find Ticket StateType id
  • therefore cannot delete Ticket StateType

Steps to reproduce the behavior:

  • create custom Ticket StateType
zammad run rails c
     name: 'Testung',
     state_type: Ticket::StateType.find_by(name: 'open'),
     created_by_id: 1,
     updated_by_id: 1,
  • make it visible for GUI
attribute = ObjectManager::Attribute.get(
     object: 'Ticket',
     name: 'state_id',
   attribute.data_option[:filter] = Ticket::State.by_category(:viewable).pluck(:id)
   attribute.screens[:create_middle]['ticket.agent'][:filter] = Ticket::State.by_category(:viewable_agent_new).pluck(:id)
   attribute.screens[:create_middle]['ticket.customer'][:filter] = Ticket::State.by_category(:viewable_customer_new).pluck(:id)
   attribute.screens[:edit]['ticket.agent'][:filter] = Ticket::State.by_category(:viewable_agent_new).pluck(:id)
   attribute.screens[:edit]['ticket.customer'][:filter] = Ticket::State.by_category(:viewable_customer_edit).pluck(:id)
  • Ticket is now visible and usable via GUI
  • find Ticket StateType id for deletion
Ticket::StateType.pluck(:id, :name)
=> [[1, "new"], [2, "open"], [3, "pending reminder"], [4, "pending action"], [5, "closed"], [6, "merged"], [7, "removed"]]
  • Ticket StateType id is not showing up
  • cannot delete it

Pease help.

Okay I can’t follow - but what ever you’re trying to do here:
Leave the Ticket-StateTypes alone at all cost.
Just don’t touch them.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.