[Rtir] Help with custom condition on scrip

Rob Moerman Rob.Moerman at rci.rogers.com
Fri Jun 27 15:38:05 EDT 2014


Never mind, figured it out. Status is in lowercase.

Thanks,

Rob
From: Rob Moerman
Sent: Friday, June 27, 2014 2:35 PM
To: rtir at lists.bestpractical.com
Subject: [Rtir] Help with custom condition on scrip


Hi there,

I'm trying to get a custom scrip to run on a status change to "Active" on an RT 4.2.5 installation.

The queue is using a custom lifecycle that includes status' of Pending > Active > Contained > Resolved > Rejected > Deleted.  All of the transitions and lifecycles have been defined and there is no issue creating, moving or transitioning tickets through the various statuses.

I've created a custom scrip with condition "User Defined" and action "User Defined" (for testing purposes, although the intention is to eventually have the scrip send an email to a distribution group.

The "Custom Condition" looks like this (based on example code taken from http://requesttracker.wikia.com/wiki/CustomConditionSnippets):

my $txn = $self->TransactionObj;
my $type = $txn->Type;
return 0 unless $type eq "Status"
|| ( $type eq 'Set' && $txn->Field eq 'Status');
return 0 unless $txn->NewValue eq "Active";
return 1;

The "Custom action preparation code" looks like this:

$RT::Logger->debug("!!!WORKS!!!\n");

This is just to dump out some text to the logs to confirm if the condition is working as intended.  It is not, and the logs show "Skipping Scrip #18 because it isn't applicable" (This would be the scrip in question).

I've tried this as both a normal and a batch script and it won't fire.

Appreciate any insight.


Robert Moerman, CISSP
Manager, Security Monitoring & Threat Response
Information Security Operations Center





________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________




________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rtir/attachments/20140627/8da8d7e0/attachment.html>


More information about the rtir mailing list