[rt-users] Custom scrip to parse new emails and reject them

Steve Hopps steve.hopps at gmail.com
Mon Nov 10 14:35:47 EST 2008


Hrm, that's what I've been trying, here's what I've got so far:condition:
user defined
action: user defined
template: blank
stage: TransactionCreate

Custom Condition:
my $Ticket = $self->TicketObj; my $Transaction = $self->TransactionObj; my
$Attachment = $Transaction->Attachments; my $AttFirst = $Attachment->First;
my $Content = $AttFirst->Content; my $test = 0; $test = 1 if (lc($Content)
=~ m/caller hung up/); if($test == 1) {$Ticket->SetStatus( Status => 'open'
, Force => 1,); return 1; }return;

custom action preparation:
return 1;

custom action cleanup:
$self->TicketObj->SetStatus( "rejected" ); return 1;
----

I must be doing something wrong tho, it's not working still? I really
appreciate all your help, thanks!!

P.S. Sorry for sending this to you directly Ruslan, my mistake!

-Steve

On Mon, Nov 10, 2008 at 12:21 PM, Ruslan Zakirov <ruz at bestpractical.com>wrote:

> Clean up this:
> http://wiki.bestpractical.com/view/ReplyBasedUponContent
> Apply this action with obviouse changes:
> http://wiki.bestpractical.com/view/ResolveTicket
>
> On Mon, Nov 10, 2008 at 9:04 PM, Steve Hopps <steve.hopps at gmail.com>
> wrote:
> > Hi, I'm sorry if this is noobish, but I'm having trouble figuring out how
> to
> > do it
> > We use a service called phonetag to take voicemails and transcribe them
> > (with attached .wav files) to emails that reach our helpdesk. The problem
> is
> > about 75% of them are blank, because the caller did not leave a message.
> > When that happens the email comes in saying "We're sorry, the caller hung
> up
> > before leaving a message". I'd like to look for "the caller hung up" and
> > have RT reject any tickets from emails containing that.
> > I tried writing my own conditions based on some samples I found online
> but I
> > can't quite get it working, can anyone recommend some documentation that
> > would get me on the right track, or any other kind of help?
> > -Steve
> > _______________________________________________
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >
> > Community help: http://wiki.bestpractical.com
> > Commercial support: sales at bestpractical.com
> >
> >
> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> > Buy a copy at http://rtbook.bestpractical.com
> >
>
>
>
> --
> Best regards, Ruslan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20081110/816671d6/attachment.htm>


More information about the rt-users mailing list