[rt-users] custom condition not working when checking requestor

Gene LeDuc gleduc at mail.sdsu.edu
Mon May 3 12:04:28 EDT 2010


Hi Andy,

Use the transaction creator instead of the ticket requestor.  On a 
create event, the e-mail sender is the transaction creator.  The creator 
will be a single entity, not a group.

   my $Transaction = $self->TransactionObj;
   my $sender = $Transaction->CreatorObj->EmailAddress;
   if ( $sender eq $Queue->CorrespondAddress ) { bzzzzt }

Good luck,
Gene

On 5/3/2010 7:59 AM, a.smith at ukgrid.net wrote:
> Hi Chris,
>
> thanks for the suggestion, I just tried this but unfortunately the
> result is the same. Actually, correcting what I said in my original
> post, this code as you can probably see is a custom condition for
> sending an auto reply, and with your code or my original code the
> problem is the same; that it IS sending the autoreply despite the
> intention of the code to only autoreply if the sender email address
> doesnt match the correspond address of the queue...
>
> thanks Andy.
>
> Quoting Chris:
>
>> try this
>>
>> my $transactionType = $self->TransactionObj->Type;
>>
>> if ($transactionType eq 'Create' &&
>> $self->TicketObj->RequestorAddresses eq $Queue->CorrespondAddress) {
>> return 1;
>> }
>> return 0;
>
>
>
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



More information about the rt-users mailing list