[rt-users] How to compare Owner verse the Email of a Correspond Condition?

Gene LeDuc gleduc at mail.sdsu.edu
Wed Jul 18 11:30:20 EDT 2007


Hi Mark,

At 08:06 AM 7/18/2007, Mark Grob wrote:
>I am new to Scrips in RT.
>
>Is it possible to compare the Owner of the the issue to the email address on
>the email going out / coming in?

Sure.  Within a scrip the comparison would be something like this:
   my $MailFromOwner = $self->TransactionObj->Type eq 'Correspond'
         && $self->TransactionObj->CreatorObj->Id == $self->TicketObj->Owner;

$MailFromOwner will be true if an incoming e-mail is from the ticket owner 
and false otherwise.  You could use this in a User Defined condition or 
within a User Defined action within a scrip.


>Is there a good Scrip How to book for RT? I got the Essentials book and it
>was light on the API and specifically the use of the custom scrip syntax.

No, it's mostly spending a lot of time in the wiki, trying out examples 
from the book, then going back to the wiki and asking questions on this list.

>I only have use of the web interface to script a solution. Suggestions?

The web interface should be all you need in most cases.  Access to the 
rt.log file will go a long way towards preventing premature aging when you 
start debugging scrips.

Have fun!
Gene


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list