[rt-users] Condition + Scrip + ScripConditions

Josh Narins jnarins at seniorbridge.com
Fri Aug 27 14:33:03 EDT 2010

RT is a really nice product.

My goal is to create a status called "fixed" which means the task is done by the owner, but the completion requires QA and/or Management approval before it moves to production. I want a ticket created in the Approvals queue when the owner changes the status to fixed (most likely from open).

I am running rt 3.8.8.

My problem is that my RT::Condition module's isApplicable method is not being called.

I have this[1] module installed and with the right permissions in lib/RT/Condition/StatusChangeFixed.pm

I have this[2] template set up on the queue.

I have this[3] installed as rt/local/etc/StatusChangeFixed.install and I executed the install command[4] successfully.

Any ideas?


package RT::Condition::StatusChangeFixed;
use base 'RT::Condition';
use strict;

sub IsApplicable {
    my $self = shift;
    return (
      $self->TransactionObj->Field eq 'Status'
      $self->TransactionObj->NewValue() eq 'fixed'
    ) ? 1 : undef;



Name: On Fixed
===Create-Ticket: Approvals
Subject: Please Approve "{$Tickets{'TOP'}->Subject}"
Queue: Approvals
Depended-On-By: {$Tickets{"TOP"}->Id}
Refers-To: {$Tickets{"TOP"}->Id}
Status: fixed
Condition: On Fixed
Content-Type: text/plain
Content: Someone has completed the task {$Tickets{'TOP'}->Subject}. Please revie
w. Resolve this ticket if the review was satisfactory.


@ScripConditions = (
    { Name        => 'On Fixed',
      Description => 'Trigger when status is changed to Fixed',
      ExecModule  => 'StatusChangeFixed',
      Argument    => 'fixed',
      ApplicableTransTypes => 'Status' },


sbin/rt-setup-database --action insert  --datafile local/etc/StatusChangeFixed.install

Josh Narins

Director of Application Development
845 Third Ave
7th Floor
New York, NY 10022
Tel: (212) 994-6194
Fax: (212) 994-4260
Mobile: (917) 488-6248
jnarins at seniorbridge.com


SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100827/ca7955d5/attachment.htm>

More information about the rt-users mailing list