[rt-users] De-assigning tickets on agent logout
Ron Alexander
Ralexander at musiciansfriend.com
Thu Nov 14 14:07:54 EST 2002
>Message: 3
>Date: Wed, 13 Nov 2002 09:42:47 -0700
>From: "Brian Shellabarger" <brian at westhost.com>
>To: <rt-users at lists.fsck.com>
>Subject: [rt-users] De-assigning tickets on agent logout
>
>
>Can I edit the URL for the Logout button to somehow de-assign all of the =
>issues a particular agent owns as he logs out?
>
>Brian
Brian,
I just glanced at the code and am by no means an rt wizard(not even like a lesser one), but I think you would want to go into ../html/Ticket/Display.html and cut out this chunk (and obviously make some changes):
-----------------
if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
my $action = $1;
my ($res, $msg)=$Ticket->$action();
push(@Actions, $msg);
}
$ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
if ($ARGS{'UpdateContent'} &&
$ARGS{'UpdateContent'} ne '' &&
$ARGS{'UpdateContent'} ne "-- \n" .
$session{'CurrentUser'}->UserObj->Signature
) {
ProcessUpdateMessage(ARGSRef=>\%ARGS,
Actions=>\@Actions,
TicketObj=>$Ticket);
}
--------------
and then you would probably want to wrap it into a loop of:
----------------------
while (my $Ticket = $MyTickets->Next) {
-----------------
and then once you get this working to your satisfaction you would want to put it into here (../html/NoAuth/Logout.html:
--------------
<HTML>
<HEAD>
<TITLE>RT: Logout</TITLE>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=<%$RT::WebPath%>/">
</HEAD>
<BODY>
<p>You have been logged out of RT.
<br>
<br>
<A HREF="<%$RT::WebPath%>/">You're welcome to login again</a>
<%PERL>
if (defined %session) {
####
####
####
YOUR CODE WOULD GO HERE
####
####
####
%session = undef;
}
$m->abort();
</%PERL>
------------------------------
Hope this MAY be a starting point,
Ron Alexander
ralexander at musiciansfriend.com
More information about the rt-users
mailing list