Scrip condition based on body of ticket?

I have a request from one of our staff that requires me to set them
as a watcher on a ticket when it’s created if the ticket contains a
certain word/phrase. However, I can’t seem to get access to the body
or subject of the ticket when it’s created. I tried something like this
in the ScripCondition:

$self->TransactionObj->ContentObj->Content =~ m/whatever/

But no dice. Anynoe have a pointer as to where I’m going wrong?
I didn’t manage to find anything suitable on the wiki.

thanks

-jkl

Josh wrote:

I have a request from one of our staff that requires me to set them
as a watcher on a ticket when it’s created if the ticket contains a
certain word/phrase. However, I can’t seem to get access to the body
or subject of the ticket when it’s created. I tried something like this
in the ScripCondition:

$self->TransactionObj->ContentObj->Content =~ m/whatever/

But no dice. Anynoe have a pointer as to where I’m going wrong?
I didn’t manage to find anything suitable on the wiki.
Use http://wiki.bestpractical.com/index.cgi?SetTicketPropertiesViaMail
as example.

Josh wrote:

I have a request from one of our staff that requires me to set them
as a watcher on a ticket when it’s created if the ticket contains a
certain word/phrase. However, I can’t seem to get access to the body
or subject of the ticket when it’s created. I tried something like this
in the ScripCondition:

$self->TransactionObj->ContentObj->Content =~ m/whatever/

But no dice. Anynoe have a pointer as to where I’m going wrong?
I didn’t manage to find anything suitable on the wiki.
Use http://wiki.bestpractical.com/index.cgi?SetTicketPropertiesViaMail
as example.

Great, that was exactly the pointer I needed. Works like a charm.

thanks

-jkl

this works for me :
if (($self->TransactionObj->Content () =~ /whatever/i )

Roy----- Original Message -----
From: “Josh” josh+rt@eldertimes.us
To: rt-users@lists.bestpractical.com
Sent: Tuesday, May 17, 2005 4:41 PM
Subject: [rt-users] Scrip condition based on body of ticket?

I have a request from one of our staff that requires me to set them
as a watcher on a ticket when it’s created if the ticket contains a
certain word/phrase. However, I can’t seem to get access to the body
or subject of the ticket when it’s created. I tried something like this
in the ScripCondition:

$self->TransactionObj->ContentObj->Content =~ m/whatever/

But no dice. Anynoe have a pointer as to where I’m going wrong?
I didn’t manage to find anything suitable on the wiki.

thanks

-jkl


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com