In RT 4.2 we've updated the scrips configuration pages and the changes will save RT admins a bunch of time when managing scrips. Specifically, you can now apply scrips globally or to selected queues on one simple configuration page.
Disabling a Scrip on Just One Queue
RT's global scrips work for most notifications, often with just some updates to the global templates. If you want different templates for specific queues, you can create a queue-specific template with the same name as the global template and the global scrip will use that template for notifications on that queue.
But what if you want to disable a notification for just one queue and leave it on for all the others? In previous versions of RT, this meant disabling the global scrip, then creating a new scrip in each queue that still needed it. In RT 4.2, this is now much easier.
For example, let's assume we have an Office queue for internal office requests and everyone agrees we don't need to see the 'On Resolve' notification when the new staples have come in. First we go to Admin > Global > Scrips and click on the "On Resolve Notify Requestors" scrip.
On the Basics page you'll notice a new Applies to label showing "Global" and a check box to enable and disable the scrip. You could previously disable scrips in a dropdown menu in the same location, but the other items in the dropdown were the scrip stages, so users often didn't know the Disabled option was in there.
The current options are fine for our case, so we click on the Applies to link in the submenu. The resulting page says "Applies to all objects", meaning the scrip is currently global. Below that is a checkbox you can check to remove the scrip from all objects. We check that and click Submit to see the new Modify page.
The new page displays all of our queues with checkboxes so we can check all queues but the Office queue. You can also change the scrip stage (normal or batch) or change the template at this point.
After we submit, we see the scrip has been applied to the selected queues.
You can now easily move scrips between queues or make it global again.
From the scrip listing pages, at both the global and queue level, you can now also manage the order in which scrips run. For default configurations, this isn't an issue for most notifications, but as you add more scrips you sometimes want to guarantee that one scrip will run before another for the same sort of update (comment, correspond, etc.). To change the order, just click the Up and Down links on the right.
You'll also notice we now separate regular scrips and batch scrips to make the running order more clear. Batch scrips run at the end of a transaction after all other scrips have run.
Scrips that are not applied appear at the bottom of the screen and you can easily select and apply them either globally, if you're on the global modify page, or on the current queue if you're on a queue-specific scrip page.
These updates should make it much easier to reuse scrips across a portion of the queues in your system and selectively apply them. The new scrip display and ordering features should also make it easier to view and control when they run.
If you'd like to learn about more new features in 4.2, take a look at the new feature overview.