[rt-users] Moving and freeing tickets with 1 button

Toby Darling darling at ccdc.cam.ac.uk
Thu Mar 9 07:02:25 EST 2006


Hi

Bjørn Skovlund Rydén wrote:
> Hi,
> 
> We have a contractor that has access to one queue in our system, once
> they've completed their actions on tickets in this queue, they have
> to return it to our queue and assign it to nobody. 

I've done something like this.

Took a local copy of html/Ticket/Elements/ShowTransaction, and added the
following lump to the end:

my $group = RT::Group->new($RT::SystemUser);
$group->LoadUserDefinedGroup('development');
my $principal = new RT::Principal($Transaction->TicketObj->CurrentUser);
$principal->Load($Transaction->TicketObj->CurrentUser->id);
     if ( $group->HasMemberRecursively( $principal ) ) {
         $titlebar_commands .=
         "<a href=\"".$DisplayPath."?id="
         . $Transaction->Ticket
         . "&Queue=support"
         . "\">"
         . loc('Return')
         . "</a>]";

This will show a 'Return' link only to people in the 'development'
group; when clicked it instantly moves the ticket into the 'support'
queue. I'm not certain, but you may be able to add a '&Owner=Nobody'
after the Queue bit.

Alternatively, what may be more efficient is to add another link to the 
'Reply Resolve Take ...' menu in the top right: take a local copy of 
html/Ticket/Elements/Tabs and add another link through there; I've got 
an 'instant resolve' link:

if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) {
     if ( $Ticket->Status ne 'resolved' ) {
         $actions->{'B'} = {
             path => "Ticket/Display.html?Status=resolved&id=" . $id,
             title => loc('Resolve') };
     }
}

Cheers
Toby




More information about the rt-users mailing list