Hi Phil,
I've never used non-standard status values, but if they work just like
"normal" status values then this should do it:
User-defined condition:
{ ### True if e-mail is from Requestor
my $Transaction = $self->TransactionObj;
my $CreatorId = $Transaction->CreatorObj->Id;
my $Ticket = $self->TicketObj;
my $val = $Transaction->Type eq 'Correspond'
&& $Ticket->Status eq "reqappr"
&& $Ticket->CreatorObj->Id == $CreatorId;
return $val;
}
Custom action (prep):
return 1;
Custom action (cleanup):
$self->TicketObj->SetStatus("open");
Regards,
Gene
At 11:25 AM 9/13/2007, Phil Lawrence wrote:
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
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com