[rt-users] auto take ticket
Joby Walker
joby at u.washington.edu
Tue May 3 02:31:43 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Xenides wrote:
> is it possible to make tickets "take" automatically when you reply to them?
>
This is very easy to do with a Scrip:
- ------------------------------------------------------------
Description: On Reply set Owner
Condition: On Correspond
Action: User Defined
Template: Global Template: Blank
Stage: TransactionCreate
Custom action preparation code:
my $ticket = $self->TicketObj;
if ($ticket->Owner eq "Nobody") {
return undef;
}
my $trans = $self->TransactionObj;
if (!$trans->CurrentUserHasRight("TakeTicket")) {
return undef;
}
$self->{'newowner'} = $trans->Creator;
return 1;
Custom action cleanup code:
$self->TicketObj->SetOwner($self->{'newowner'});
return 1;
- ------------------------------------------------------------
jbw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCdxrPgA0gpghkf88RAtcJAKDRmfyhvqPHZ5vez0qr6VGQX1L1JQCdF8aJ
hVvuYjchaWP3UhXPBmedy4A=
=Nuj1
-----END PGP SIGNATURE-----
More information about the rt-users
mailing list