[Rt-devel] Interesting Reset ticket On Queue Change
HKG RI-CI/LIU, YANFAT
yanfat.liu at kuehne-nagel.com
Mon Jul 23 05:50:29 EDT 2007
Hi Torsten, Joby Walker, Christian Loos,
Thanks for your reply.
For the scrips by provided by Joby,
i think your main concern is that the user is owning a ticket, and there was
bug if he DONT have right to own the new queue, it would wrongly assigned to
that user! The scrip work perfectly before that bug is fixed...seems, but
i'm not sure about RT 3.4.X..I cant remeber exactly from my finding.
So, i did some testing...as said by Torsten, unless you are the owner or
ticket is unwoned, the owner cant be changed.
Also, i found that after the bug is fixed, except the 'super user' who can
own all tickets, can do this.
but after the bug fixed, say a user has right to own tickets ONLY in both
queue1 and queue2, he can change tickets ONLY within these 2 queues, and
applying UI scrip for reseting, problem occured as it roll back to that
user!!
And for Loos,
seems we have same condition. and i would like to ask, there is even no
'Unchanged' option for drop down list of 'Status'. so, why it can be reset
by scrip back to 'new', but problem exist on 'Owner'?
Please advise.
Best Regards,
Steven Liu
HKG RI-CI
Tel: +852 2823 4396
Email: yanfat.liu at kuehne-nagel.com
-----Original Message-----
Date: Fri, 20 Jul 2007 09:33:51 -0700
From: Joby Walker <joby at u.washington.edu>
Subject: Re: AW: [Rt-devel] Interesting Reset ticket On Queue Change
Cc: rt-devel at lists.bestpractical.com
Message-ID: <46A0E3EF.4020006 at u.washington.edu>
Content-Type: text/plain; charset=UTF-8
We use two scrips:
1) change the status to new on queue change:
Condition: "On Queue Change"
Action: "User Defined"
Template: "Global Template: Blank"
Custom Action prep code:
return 1;
Custom Action cleanup code:
$self->TicketObj()->setStatus('new');
return 1;
2) Dropping the owner if they do not have permission to own the ticket
in the new queue:
Condition: "On Queue Change"
Action: "User Defined"
Template: "Global Template: Blank"
Custom Action prep code:
my $t = $self->TicketObj;
if ($t->HasRight( Right => 'OwnTicket', Principal => $t->OwnerObj)) {
return 0;
} else {
return 1;
}
Custom Action cleanup code:
my ($status, $msg) = $self->TicketObj->SetOwner('Nobody', 'Force');
unless ($status) {
$RT::Logger->error($msg);
}
return $status;
Joby Walker
C&C SSG, University of Washington
More information about the Rt-devel
mailing list