I want to create a Macro for SPAM tickets. On some of those tickets, we have to change the customer, as the email address of the sender is a “bounce back” address and tickets keep re-opening. Thus, Ive set the following Macro:
When I apply the Macro on the spam tickets, I do get the following error message:
I tried debugging the customer_id field for my user (the current user while running the Macro) in the rails console, but seems like customer_id is not a user field.
irb(main):015:0> User.find(8).customer_id
Traceback (most recent call last):
1: from (irb):15
NoMethodError (undefined method `customer_id' for #<User:0x0000562ada93aae8>)
Did you mean? customer_ticket_ids
Manually changing the Customer, applying the tag and closing the ticket works as expected.
Any idea on how to make the Marcro work? Thanks much
Sebastian
Looks like a bug, even through I find setting the current user running the operation very sketchy.
Please create a bug report at https://github.com/zammad/zammad and reference this thread.
Would you have any other recommendation to conveniently replace a customer?
The use-case is as follows:
We receive tickets that are either informational or just SPAM, but the account creating those tickets is a noreply@ address. So when you close the ticket, a “ticket closed” mail is triggered towards noreply.
Most companies reply with “this mailbox is not monitored”, which in turn re-opens the ticket.
As long as you don’t manually change the customer, the ticket will remain open.
Since we also add some tags to those tickets using a Macro, the idea was easy to just replace the customer within the same macro.
If you have a better idea on how to achieve prevent re-opening of those tickets in an easy way, I’d also love to take a look at that.
Thanks much
Sebastian