Trigger with State=Closed&Action=Updated conditions does not work


  • Used Zammad version: 5.2.3
  • Installation method (source, package, …): Package
  • Operating system: Ubuntu Server 22.04
  • Database + version: Postgres 12.12
  • Elasticsearch version: 7.17.0
  • Browser + version: Chrome 107.0.5304.121

Expected behavior:

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.

That’s a repost from Trigger with State=Closed&Action=Updated conditions does not work · Issue #4399 · zammad/zammad · GitHub

Any ideas? I’ve been told this is not a bug, so I probably need explanation on how this works :frowning:

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.

Could you please share a bit details on that? Would really appreciate this!

I just tested this. This is my Workflow:

  • Ticket is set to “pending close”
  • 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

  • now the customer replies, the ticket state changes and a trigger fires, sends the warning mail and remove the “already closed”-tag

This works for me, as you expected.

(*) 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”.

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