[rt-users] auto take ticket
Andrew Xenides
andrew at staff.esc.net.au
Tue May 3 19:59:05 EDT 2005
Thanks for that, but I think you meant
> my $ticket = $self->TicketObj;
> if ($ticket->Owner eq "Nobody") {
> return undef;
> }
if ($ticket->Owner ne "Nobody") {
return undef;
}
Hrm... It seems that it doesn't work with either.
Andrew Xenides
Web Developer
EscapeNet
465 South Road
Keswick SA 5035
T: (08) 8292 5200
F: (08) 8292 5299
E: andrew at staff.esc.net.au
W: http://www.esc.net.au
> -----Original Message-----
> From: Joby Walker [mailto:joby at u.washington.edu]
> Sent: Tuesday, 3 May 2005 4:02 PM
> To: Andrew Xenides
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] auto take ticket
>
> -----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