At Wednesday 5/23/2007 12:58 PM, José de Paula Eufrásio Júnior wrote:
Can you share your scrip for me to use it as a starting point? :)
[]s
core
Hi Jose,
Sure - the scrip is
Condition - user defined (see code below)
Action - notify requestor
Template - survey email (contains a link to the survey page)
The Custom condition code is:
# Only deal with Resolve transactions:
return 0 unless $self->TransactionObj->Type eq "Status"
&& $self->TransactionObj->NewValue eq "resolved";
my $ticket = $self->TicketObj;
my $trans_list = $self->TicketObj->Transactions;
my $trans;
my $num_resolved = 0;
while ($trans = $trans_list->Next)
{
$num_resolved++ if ($trans->Ticket == $self->TicketObj->Id) &&
($trans->Type eq "Status") &&
($trans->NewValue eq "resolved");
}
# Only send mail the first time a ticket is resolved:
return 0 if $num_resolved > 1;
return 1;
Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)
_______________________________________________
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