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

Ruslan Zakirov ruz at bestpractical.com
Thu Aug 23 15:16:22 EDT 2007

Oh, you've found solution, I hope another reply will make things
clearer and help you next day :)

On 8/23/07, Sean <stroke_of_death at yahoo.com> wrote:
> This did it.
> It was actually that we have a default incoming queue, and certain team members
> are say, unix, and others are network, so when someone in the network team took
> at ticket, it would move to the network queue (vs. having their own personal queue)
> so i am storing the value of the queue (unix, network, etc...) in the "Organization" field, so
> I took your snippet below:
> $self->TicketObj->SetQueue($self->TicketObj->OwnerObj->Name);
> and changed it to:
> $self->TicketObj->SetQueue($self->TicketObj->OwnerObj->Organization);
> Thanks a million!!!!
> -Sean
> ----- Original Message ----
> From: Gene LeDuc <gleduc at mail.sdsu.edu>
> To: Sean <stroke_of_death at yahoo.com>; rt-users at lists.bestpractical.com
> Sent: Thursday, August 23, 2007 11:18:20 AM
> Subject: Re: [rt-users] Scrip Help needed (grabbing Organization)
> Hi Sean,
> Here's my understanding of what you're trying to do:
> 1.  Ticket comes in to default incoming queue.
> 2.  An admin sees it and changes the Owner to himself.
> 3.  The ticket moves into the admin's personal queue.
> If that is it, there's a pretty simple way to do this.  Use your "On Owner
> Change" scrip and replace the actions stuff with this.  It should move the
> ticket into a queue that has the same name as the ticket owner.
> $self->TicketObj->SetQueue($self->TicketObj->OwnerObj->Name);
> If your objective is something else, could you clarify that for me?
> Regards,
> Gene
> At 06:28 PM 8/22/2007, 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
> --
> Gene LeDuc, GSEC
> Security Analyst
> San Diego State University
>       ____________________________________________________________________________________
> Luggage? GPS? Comic books?
> Check out fitting gifts for grads at Yahoo! Search
> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
> _______________________________________________
> 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

Best regards, Ruslan.

More information about the rt-users mailing list