De-assigning tickets on agent logout

We’d like to make it so that if an agent clicks the “logout” button, all of the tickets assigned to that agent are automatically assigned back to “nobody”. In effect, we want to eliminate ticket ownership and make sure agents are given the mindset that all tickets belong to everyone. We are a 24x7 support operation and when the night-shift guys come in, they needs to be able to work on the same tickets the day-shift guys did without feeling like they’re working on “Bob’s Ticket”… However, to prevent more than one agent from working on a ticket at the same time, we need to make sure they can still claim ownership of a ticket for a time.

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

Message: 3
Date: Wed, 13 Nov 2002 09:42:47 -0700
From: “Brian Shellabarger” brian@westhost.com
To: rt-users@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:

RT: Logout

You have been logged out of RT.

You're welcome to login again

<%PERL>
if (defined %session) {
YOUR CODE WOULD GO HERE
%session = undef;
}
$m->abort();
</%PERL>
Hope this MAY be a starting point,
Ron Alexander
ralexander@musiciansfriend.com

<%PERL>
if (defined %session) {

YOUR CODE WOULD GO HERE

To make things easier for you should this suddenly turn out to be not what
you want, use the HTML::Mason <& include &> directives to put the code to
remove all current issues for a user in a separate file.

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security