When a Customer replies to a closed ticket, he should be emailed with a warning, ticket status changed to “Opened” and its priority raised.
Actual behavior:
Ticket is only reopened, seems like not by the trigger but rather with follow-up settings of its ticket group. That said, follow-up actions are applied before ticket action is checked against triggers, which seems like a bug.
Steps to reproduce the behavior:
Create a trigger with:
State is closed
Action is updated
Sender is Customer
Type is email
Email Zammad to create a ticket, then close the ticket.
When its closed, reply to ticket from email to re-open it.
I don’t think your trigger will work at all. When the customer replies, the ticket state is changed to open. Therefore your trigger does not apply. It will only apply to closed ticket states.
May want to try changing that to State has changed. See if that helps you achieve what you are looking for.
I use tags like „already closed“ for such a behaviour. Maybe this will work for you. Add a tag on ticket closing and then in your trigger check, if this tag exists.
The “pending close” - event fires and set the ticket state to “To close”(*)
An automatization every 10 minutes looks for tickets with state “To close” and sends an email to the customer, that the ticket is closed, adds a “already closed”-tag and closes the ticket
(*) You have to change the settings from the ticket state “pending close” in order to get this example working. The property “next_state_id” have to be set to your newly created ticket state “to close”.