Disable a global RT scrip for some queues
We're using RT quite a lot. Today I needed to disable some 'Scrips' in one queue, while keeping the in all other queues. Unfortunatly, RT does not support this out of the box. While there is a plugin that seems to implement that feature (RT-Extension-QueueDeactivatedScrips) I decided to fix this without touching RTs innards.
The trick is to add a 'Custom condition' to the global script, which returns false for the relevant queue:
return $self->TicketObj->QueueObj->Name ne 'babilu::support'
Unfortunantly, this is not enough (and it took me some testing and manic clicking through RT to figure this out). You also need to change the 'Condition' from whatever the Scrip is using to 'User Defined', and then test for the condtion yourself:
return ( ($self->TransactionObj->Type eq "Correspond") && ($self->TicketObj->QueueObj->Name ne 'babilu::support') )
If this is an On Correspond Notify Foo using CorrespondTemplate scrip, you can disable it on the queue level by creating a Queue level CorrespondTemplate template which is blank. RT won't send any email if the template is empty. Just make sure that the template you override won't affect other scrips (you can always change your one scrip globally to use a different template to make separating and overriding them easier).
ah, thanks for the tip! That seems to be a bit easier than what I did...