[rt-users] sql querries in scrips

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Oct 19 18:31:15 EDT 2005


On 10/20/05, Daniel Kercher <daniel.kercher at web.de> wrote:
> Hello List,
>
> is it possible to querry the rt3 db in scrips? and when yes how?
Yes, this possible.

>
> what i want is to automaticly move a new created ticket to a user
> based on how bussy he is. so i have to query the db or get infos how
> much tickets a user own and what status this ticket have.
Oh, nice idea, owners auto balancer for tickets.

You can use something like this(untested):
my $tix = RT::Tickets->new($self->CurrentUser);
$tix->FromSQL("Owner = <user_id> AND Status = 'new'");
$tix->Count;

wiki is your friend

>
> --
>    Gruesse Daniel
>
> -------------------------------------------------------------------------------
> Wenn wir bedenken, daß wir alle verrueckt sind, ist das Leben erklaert.
> [Mark Twain]
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Buy your copy of our new book, RT Essentials, today!
>
> Download a free sample chapter from http://rtbook.bestpractical.com
>


--
Best regards, Ruslan.



More information about the rt-users mailing list