[rt-users] scrip: how to check if correspondence from requestor

Phil Lawrence phil at five-lawrences.com
Thu Sep 13 14:25:35 EDT 2007


Hello,

I want to use a scrip to change the status of a ticket to "open" if
the current status is "reqappr" and RT receives an email from the
requester.

Can anyone help me fill in the following <???> (or make other
corrections if needed):

Description: OnCorrespondFromReqReReqaddrTicket
Condition: UserDefined
Action: UserDefined
Template: Global template: Blank
Stage: TransactionCreate

Custom Condition:
if (
     $self->TransactionObj->Type eq "Correspond"
     and
     $self->TicketObj->Status eq "reqappr"
     and
     <???> eq $self->TicketObj->RequestorAddresses;
   )
{
    $self->TicketObj()->setStatus('open');
    return(1);
} else {
    return(undef);
}

Custom action preparation code:
return 1;

Custom action cleanup code:
<blank>

Thanks,
Phil Lawrence



More information about the rt-users mailing list