On Wed, 25 Feb 2009 15:51:05 -0500, Jo Rhett <jrh...@netconsonance.com>  
wrote:

> So we want to e-mail a copy of the web interface input to the
> requestors when (and only when) the ticket was created via the web ui.
>
> I'm guessing I should have a Scrip with a test for ->IsInbound() to
> determine if we opened the ticket for them.
>
> Any gotchas with this?  Anybody gone down this road before and had
> issues?
>

We query the message attachment for a 'Received' header, and if it's  
present we assume an email message; if not we assume a web transaction:

     my $trans = $self->TransactionObj;

     # Get the message attachment
     my $msgattr = $trans->Message->First;

     if ( $msgattr and $msgattr->GetHeader('Received') ) {
        # This is an email transaction
     } else {
        # This is a web transaction
     }

You probably would add a piece that makes this happen only for a Create  
transaction...

Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to