Which scripts fire when

Hi all,
In my last email, I asked about duplicate messages being sent out and was
told to check the RT workflow and enabled scripts. In doing so, I realized
I don’t quite get how different scripts fire or are ignored.

For instance, we have a global script that notifies owner and CCs on ticket
correspond. Some queues have the same script, using the same template,
because we thought for a while we might need to set different templates on
different queues. But we don’t, so the global and queue-specific scripts do
the same thing. My first thought is that this is causing some of our
duplication problems, but it can’t be, because people sometimes get just
one email, and sometimes three or four.

Ideally, I’d like a way to generate a transaction and find out exactly what
scripts did what, and what email was sent to whom as a result of each one.
Is that kind of monitoring possible? I suspect a debug log would be far
more verbose than I need or not provide the kind of detail I’m after, but
if that’s the only way, that’s the only way. Still, if a different option
exists, I’d love to know about it.

I guess that’s it for now. I’d like a way to watch the different scripts do
their thing for a single transaction, and I need to better understand how
the different scripts decide when to fire and when to stay quiet. Thanks as
always!

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

I guess that’s it for now. I’d like a way to watch the different scripts do their thing for a single transaction, and I need to better understand how the different scripts decide when to fire and when to stay quiet. Thanks as always!

The debug log will do just that. It will tell you what scrip is being skipped or is triggering for what ticket and transaction.

Example of a ticket being created:
[16981] [Mon Oct 17 16:03:31 2016] [debug]: About to prepare scrips for transaction #3644426 (/opt/rt4/sbin/…/lib/RT/Transaction.pm:187)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Found 20 scrips for TransactionCreate stage with applicable type(s) Create for txn #3644426 on ticket #20035600 (/opt/rt4/sbin/…/lib/RT/Scrips.pm:495)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #18 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #20 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #42 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #21 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #24 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #25 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Skipping Scrip #78 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: About to commit scrips for transaction #3644426 (/opt/rt4/sbin/…/lib/RT/Transaction.pm:210)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Committing scrip #13 on txn #3644426 of ticket #20035600 (/opt/rt4/sbin/…/lib/RT/Scrips.pm:306)
[16981] [Mon Oct 17 16:03:31 2016] [debug]: Committing scrip #16 on txn #3644426 of ticket #20035600 (/opt/rt4/sbin/…/lib/RT/Scrips.pm:306)

Example of a custom field change (different ticket than above):
[16980] [Mon Oct 17 16:03:55 2016] [debug]: About to prepare scrips for transaction #3644476 (/opt/rt4/sbin/…/lib/RT/Transaction.pm:187)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Found 8 scrips for TransactionCreate stage with applicable type(s) CustomField for txn #3644476 on ticket #20035308 (/opt/rt4/sbin/…/lib/RT/Scrips.pm:495)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #21 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #24 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #25 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #31 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #32 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #74 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)
[16980] [Mon Oct 17 16:03:55 2016] [debug]: Skipping Scrip #78 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:353)

Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
:e-mail: lstewart@internap.commailto:lstewart@internap.com
:earth_africa: www.internap.comhttp://www.internap.com