New ticket states are not visible

Infos:

Important:
If you are a Zammad Support or hosted customer and experience a technical issue, please refer to: support@zammad.com using your zammad-hostname / or company contract.

  • Used Zammad version: 2.7
  • Used Zammad installation source: (source, package, …) source
  • Operating system: debian
  • Browser + version: any

Expected behavior:

  • The new ticket states should be visible in the gui

Actual behavior:

  • The new ticket states are not visible

Steps to reproduce the behavior:

  • Create new ticket states with the api

You’ll need to restart the Zammad-Service and Reload the WebApp. The new states should appear.
If not check if you can find them on command line / via API.

Thank you! The ticket states weren’t enabled by default. I updated them via API and checked the value again. Now they are activated:
Screenshot_1

After a restart of the scheduler, service and webservice, the states still don’t appear in the gui:
Screenshot_2

I also rebuilded the elasticsearch search index and restarted again but nothing changed.

Am I doing something wrong?

I also created the related state types. If I run Ticket::StateType.all in the Rails console I get the following result:

#<Ticket::StateType id: 10, name: "waiting for customer", note: nil, updated_by_id: 1, created_by_id: 1, created_at: nil, updated_at: nil>,
#<Ticket::StateType id: 11, name: "open customerreply", note: nil, updated_by_id: 1, created_by_id: 1, created_at: nil, updated_at: nil>]

And when querying the states with Ticket::State.all I get the following:

#<Ticket::State id: 8, state_type_id: 10, name: "waiting for customer", next_state_id: nil, ignore_escalation: false, default_create: false, default_follow_up: false, note: nil, active: true, updated_by_id: 3, created_by_id: 3, created_at: "2018-11-14 13:40:02", updated_at: "2018-11-14 13:40:02">,
#<Ticket::State id: 9, state_type_id: 11, name: "open customerreply", next_state_id: nil, ignore_escalation: false, default_create: false, default_follow_up: false, note: nil, active: true, updated_by_id: 3, created_by_id: 3, created_at: "2018-11-14 14:45:19", updated_at: "2018-11-14 14:45:19">

Ah the code stuff left a good clue.
What you want to add is a new Ticket::State instead of a Ticket::StateType :slight_smile:

The StateTypes basically are needed to use the States themselve.
Please refer to: https://docs.zammad.org/en/latest/admin-console.html#add-new-ticket-state

have the time to dig into the “API-Way”, maybe Console is working for you too at the moment?

Thank you very much for this information!

I recreated/updated the ticket states like this:
Ticket::State.create_or_update( name: 'waiting for customer', state_type: Ticket::StateType.find_by(name: 'waiting for customer'), ignore_escalation: true, created_by_id: 1, updated_by_id: 1, )

Ticket::State.create_or_update( name: 'open customerreply', state_type: Ticket::StateType.find_by(name: 'open customerreply'), ignore_escalation: false, created_by_id: 1, updated_by_id: 1, )

And then I run the following commands (from the documentation) in the console:
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) attribute.save!

Is this correct? Cause the states are still not visible - even after a restart :see_no_evil:

The ticket states are now visible when you edit a overview:

But nowhere else :face_with_raised_eyebrow:

@MrGeneration You have any idea, why the states are not visible inside the tickets?

Sorry for the delay.

No, this is not correct. =X

"Ticket::StateType.find_by(name: 'open customerreply') is not for referencing other state, but for available state-types (that’s a difference) inside the System.

By default there are the following StateTypes:

2.4.4 :003 > Ticket::StateType.find(1)
 => #<Ticket::StateType id: 1, name: "new", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :004 > Ticket::StateType.find(2)
 => #<Ticket::StateType id: 2, name: "open", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :005 > Ticket::StateType.find(3)
 => #<Ticket::StateType id: 3, name: "pending reminder", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :006 > Ticket::StateType.find(4)
 => #<Ticket::StateType id: 4, name: "pending action", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :007 > Ticket::StateType.find(5)
 => #<Ticket::StateType id: 5, name: "closed", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :008 > Ticket::StateType.find(6)
 => #<Ticket::StateType id: 6, name: "merged", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">
2.4.4 :009 > Ticket::StateType.find(7)
 => #<Ticket::StateType id: 7, name: "removed", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2018-12-06 12:30:15", updated_at: "2018-12-06 12:30:15">

My guess is that you want this state to be a pending state, but I’m not sure about that.

Hey, thank you very much for your reply! Yeah, this should be some kind of a pending state. I added the STATETYPES through the database. Isn’t it possible to use own statetypes?

I don’t know to be honest, I personally don’t think so, but @thorsteneckel might know that better and get back to you, as soon as he has time.

TBH I missed the question. How can I help? What is the problem/obstacle?

Hello Thorsten,

we tried to create some ticket states and ticket state types (for the ticket states). But they are not visible when editing a ticket:

But when working with the overviews, they are visible:

We created the ticket states with the API and later on throug the console:

The ticket state types are first created inside the mysql database. We restarted the Zammad server mutliple times, dropped the cache and elastic search search index.

What are we doing wrong? Can’t we use new/own ticket state types?

Thank you very much for your help!

Hey,

I already answered this further up in this Thread:
You need to create a new TicketState not a new TicketStateType!

You basically do not create a new Ticket state, please check out our documentation here:
https://docs.zammad.org/en/latest/admin-console.html#add-new-ticket-state

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