Stop processing scrips

We have a few queues, and for most of them we have a custom scrip that looks for a spam header. If the header is found, the ticket is moved to the ‘Junk’ queue.

The problem I want to solve is that I want to stop sending out notifications about ticket creatons for these tickets.

Is there a way for me to stop processing other scrips for the ticket in my action commit code? Some easy way to add a condition to the global ‘Notify AdminCC’ scrip?
What would be the least intrusive way to accomplish this?

You can create queue level templates, go to the queue and create a new template. Make it the same name as the notification scrip’s (there are a few) template and make the content blank.

Since there is no content, no email will be sent for that queue

Thanks for the idea knation, but it doesn’t help, since it’s the original queue that sends the email and I don’t want to disable sending notifications for all tickets in the queue.

I’m looking for a way to stop the original queue from sending the notification email, if the ‘Send to Junk’ scrip moved the ticket to the ‘Junk’ queue.

Using the normal flow of scrips on a queue you can’t really do this easily, as the scrips’ actions to run are marshalled at the start and gone through one at a time, and they can’t stop the execution of subsequent actions (but they can of course create more actions, for example if they create a new transaction as a side effect of what they are doing). Effectively this is covered by the first item on the wiki list of what scrips can’t do.

The only suggest I can give is to have a CF on the tickets called something like “Junk”, have the spam detection scrip run first, set this CF if the ticket is junk and then in every subsequent scrip action/template check if this CF exists/is set and don’t output anything from that scrip/template if it is.