[Rt-devel] [Fwd: Re: [rt-users] Scrips issue]
Luiz Henrique Ozaki
luiz at eaprender.com.br
Thu Jun 2 13:44:48 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've got it !! Enanbling the debug ive got the error.
Here goes:
Description: AutoClose on e-mail reply with a determinated string in
the Subject
Condition: On Correspond
Action: User Defined
Template: Blank
Stage: TransactionCreate
Custom condition:
Custom action preparation code:
1;
Custom action cleanup code:
my $problem_desc = undef;
my $Transaction = $self->TransactionObj;
my $subject = $Transaction->Attachments->First->GetHeader('Subject');
if ($subject =~ m/fechar/) {
$problem_desc = $2;
$RT::Logger->debug("Usuario aprovou a solucao: $problem_desc");
} else {
return 1;
}
my $search = RT::Tickets->new($RT::SystemUser);
$search->LimitQueue(VALUE => 'General');
$search->LimitStatus(VALUE => 'new', OPERATOR => '=', ENTRYAGGREGATOR
=> 'or');
$search->LimitStatus(VALUE => 'open', OPERATOR => '=');
if ($search->Count == 0) { return 1; }
my $id = undef;
while (my $ticket = $search->Next) {
next if $self->TicketObj->Id == $ticket->Id;
$id = $ticket->Id;
last;
}
$id || return 1;
$self->TicketObj->SetStatus( "resolved" );
1;
Now I have another problem. How Can I make a unique mail to correspond
to all the queues ??
- --
[]'s
Luiz Henrique Ozaki <luiz at eaprender.com.br>
0xC842A83F KEYID
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFCn0WQw2cLyMhCqD8RAm4CAJ9OPIaJ2p+veB7IB4fsZIBBqIOzRwCgkf0p
D3OVlfZp1TI/51lUP+oR93s=
=ucbI
-----END PGP SIGNATURE-----
More information about the Rt-devel
mailing list