Rerun Scrips/Manually execute Scrips

Hello,

I’m trying to figure out a way of manually triggering Scrips or rerunning Scrips on a specific ticket. As far as I know this can only occur on a Transaction but is there possibly some way of doing this without triggering a transaction?

As scrips are fired off from actions based on certain transactions (create, correspondance, etc) they’d still need a transaction to run against. Are you trying to rerun them against some previous transaction?

Yep, that’s pretty much what I’m trying to do.

OK, in which case take a look at lib/RT/Scrips.pm as that’s where you can build up a collection of Scrip objects and then call the Apply() method with your ticket and transaction objects, stage and type. This method is actually a simple wrapper that calls the Prepare() method followed by the Commit() methods.

Your’ll need to craft a custom Perl script to do this as I don’t think there’s an available tool already in the RT distribution to do it.