Default state disappeard after I capitalized it

Infos:

  • Used Zammad version: 3.6
  • Operating system: Ubuntu 20.04.1 LTS
  • Browser + version: Chrome, Opera, Firefox

Expected behavior:

  • Run following commands:
    Ticket::StateType.find_by(name: 'open').update(name: 'Open')
    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_edit).pluck(:id)
    attribute.screens[:edit]['ticket.customer'][:filter] = 
    Ticket::State.by_category(:viewable_customer_edit).pluck(:id)
    attribute.save!
    

Expected Open to be a selectable ticket state instead of open.

Actual behavior:

Default open ticket state has since disappeared from web ui after renaming it to Open. Also all of the states made using the open state type have disappeared from the web ui.

Question:

Can I change the capitalization of default states? I prefer them to start with a capital letter.

Why would you rename the StateType instead of the State…?
Just leave the StateTypes alone…

In your case you’re looking for Ticket::State.
I strongly suggest to not run rails commands blindly if you’re not absolutely sure what you’re doing.

You can possibly nuke your instance to a state that’s not recoverable.

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