We have a problem in the UI in Zammad status “Open After”.
If you set the state and update, it will work. However, the marker for “unsaved changes” remains.
Only when you close the ticket and “Changes discarded” the marker disappears. The new status remains set nevertheless.
As soon as this ticket is opened again, the marker “Unsaved changes” reappears.
To understand why a new status was created.
We are coming from OTRS and the import to Zammad has messed up all the states. It was partly English and German mixed and other errors.
So we disabled all states of Zammad to avoid collisions. The new state came later.
Infos:
- Used Zammad version: 3.4.x
- Installation method (source, package, …): Debian PPA
- Operating system: Debian 9
- Database + version: Postgres 9
- Elasticsearch version: 5.6.16
- Browser + version: Firefox 78.0.2
Expected behavior:
The status is saved correctly and there is no mark with “Unsaved changes”.
Actual behavior:
If you set the state and update, it will work. However, the marker for “unsaved changes” remains.
Only when you close the ticket and “Changes discarded” the marker disappears. The new status remains set nevertheless.
As soon as this ticket is opened again, the marker “Unsaved changes” reappears.
strong text
Steps to reproduce the behavior:
Follow this Guide for Pending and add time/date
https://docs.zammad.org/en/latest/admin/console/working-on-tickets.html#add-a-date-and-time-picker-pending-till-for-pending-states
The following commands were used for this status.
1. Create State
Ticket::State.create_or_update( name: 'Öffnen nach', state_type_id: 4, ignore_escalation: true, next_state_id: 2, created_by_id: 1, updated_by_id: 1, )
2. Add Timetable
ObjectManager::Attribute.add( force: true, object: 'Ticket', name: 'pending_time', display: 'Pending till', data_type: 'datetime', data_option: { future: true, past: false, diff: 24, null: true, translate: true, required_if: { state_id: 15, }, shown_if: { state_id: 15, }, }, editable:false, active: true, screens: { create_middle: { '-all-' => { null: false, item_class: 'column', }, }, edit: { '-all-' => { null: false, }, }, }, to_create: false, to_migrate: false, to_delete: false, position: 41, )
3. Update Zammad-UI
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!