[rt-users] Notify via SMS if ticket Subject =~ /urgent/i

Kevin Falcone falcone at bestpractical.com
Fri Jul 26 08:52:37 EDT 2013

On Thu, Jul 25, 2013 at 01:15:33PM -0400, EJ Marmonti wrote:
>    The portion of sending the SMS message itself I figured out so that's less of a concern - in
>    the template, I just CC the sms address (if Action=Notify AdminCCs', this works), though I am
>    open to other suggestions. It's the scrip itself that I'm really having issues with.
>    What I have so far:
>    Description: On create URGENT, notify SMS
>    Condition: On Transaction
>    Action: User Defined
>    Template: On Create Urgent ticket, notify SMS
>    Stage: TransactionCreate

If you have an Action of User Defined, your Template isn't going to be
used unless you're loading it up and sending mail manually.

It sounds to me like you actually wanted
Condition: User Defined
Action: Notify Other Recipieints or Notify Ccs or a custom notify
action created with

You can combine your Custom action prep code and Custom action cleanup
code into that condition, although I am a little confused.  You
apparently only want to check the subject if the status of the ticket
changes (rather than say when the ticket is created?) but that may be
what you wanted.


>    ===Custom condition: n/a
>    ===Custom action prep code:
>    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 "new";
>    ===Custom action cleanup code:
>    my $subject = $self->TicketObj->Subject;
>    if ($subject =~ /urgent/i) {
>    return 1;
>    }
>    else {
>    return 0;
>    }
>    I found some decent references out there, but this isn't sending the notification and I'm
>    stumped. I know there are many people out there who have done the equivalent of what I'm
>    trying to accomplish.
>    Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130726/e4266325/attachment.sig>

More information about the rt-users mailing list