Auto take ticket

is it possible to make tickets “take” automatically when you reply to them?

Andrew Xenides
Web Developer
EscapeNet
465 South Road
Keswick SA 5035
T: (08) 8292 5200
F: (08) 8292 5299
E: andrew@staff.esc.net.au
W: http://www.esc.net.au

-----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-----

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@staff.esc.net.au
W: http://www.esc.net.au

Hm, it’s documented allready :slight_smile:
http://wiki.bestpractical.com/index.cgi?AutoSetOwner

Andrew Xenides wrote:

Ruslan U. Zakirov wrote:

Hm, it’s documented allready :slight_smile:
Request Tracker Wiki

Andrew Xenides wrote:

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@staff.esc.net.au
W: http://www.esc.net.au

-----Original Message-----
From: Joby Walker [mailto:joby@u.washington.edu] Sent: Tuesday, 3
May 2005 4:02 PM
To: Andrew Xenides
Cc: rt-users@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-----


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

This is for all tickets no matter what queue? How do I change it to only
do this for a specific queue?

Vicki