[rt-users] Scrip Help needed (grabbing Organization)

Kenneth Crocker KFCrocker at lbl.gov
Thu Aug 23 12:47:07 EDT 2007


	Why go through all that? Why not give each AdminCc of each different 
queue the right to "SeeQueue", ShowTicket", "ModifyTicket", 
"CommentOnTicket" in the general queue where all the tickets are held 
originally (maybe create a group named "QueueAdmin" for that purpose 
alone) that way they can find tickets they should work on in the general 
Queue and make a comment and change the queue (and maybe even assign an 
owner) all at once for any particular ticket so someone in the 
support-group that works on tickets in the new queue can take it. Either 
way, the ticket has been moved without the need of scrips or custom 
fields. BTW, the correct message would be "Ticket taken ...". I either 
don't understand the question or the nned or both. ??


Sean wrote:
> Hi,
> I am trying to modify one of the contributed scrip's on here which relates to "taking a ticket" and having it automatically go to a certain queue.
> We have one queue that all requests go to (i.e. customer facing) and the admins have their own queues of responsibility. I didn't want to screw with custom fields, and because we don't use the information in the customer info page (i.e address etc..) I figured just for the admin's, I would put the queue name in the organization field.
> So, here is the scrip, which I have tried for hours to get to work (so there may be some extraneous things here) - Basically, the problem as I see it, is that I can't get the syntax or something correct to get the value in the organization field, as when I set:
> $newqueue = "queue1" - the code DOES change the queue, but I can't get it to grab the value in the organization field. 
> The scrip is 
> Condition: On Owner Change, 
> Action: User Defined, 
> Template: Global template: blank, 
> Stage is TransactionCreate
> Script in Custom condition: blank
> Scrip in Custom action preparation code: 
> return 1
> Scrip in action cleanup code:
> my $User = new RT::User($RT::SystemUser); 
> $User->Load( $User->Organization);
> my $newqueue = $User->Organization;
> $newqueue = ($User->Organization);
> $RT::Logger->info("Ticket took by an admin : new ticket in admin queue"); 
> my ($status, $msg) = $self->TicketObj->SetQueue($newqueue); 
> $self->TicketObj->SetQueue($newqueue); 
> $RT::Logger->info("Set queue to ($newqueue)");
> return 1;
> Output in /var/log/messages:
> Aug 22 21:25:38 rt RT: Ticket took by an admin : new ticket in admin queue ((eva
> l 2459):6)
> Aug 22 21:25:38 rt RT: Set queue to () ((eval 2459):9)
> Thanks for any help.
> ____________________________________________________________________________________
> Pinpoint customers who are looking for what you sell. 
> http://searchmarketing.yahoo.com/
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com

More information about the rt-users mailing list