[rt-users] Newbie to RT hacking - orphaned tickets

Phil Homewood pdh at snapgear.com
Mon Dec 23 17:31:01 EST 2002


Binand Raj S. wrote:
> <%INIT>
> my $OrphanedTickets;
> $OrphanedTickets = new RT::Tickets ($session{'CurrentUser'});
> $OrphanedTickets->LimitOwner(VALUE => 2);
> $OrphanedTickets->LimitStatus(VALUE => "new");
> $OrphanedTickets->OrderBy(FIELD => 'Id', ORDER => 'ASC');
> $OrphanedTickets->RowsPerPage(25);
> </%INIT>
> 
> 1. Why do I have to use $session{'CurrentUser'} ? Since the
> list of tickets generated has nothing to do with CurrentUser
> anyway. What do I use here? (I just copy/pasted that from
> the MyTickets file there, btw).

$session{'CurrentUser'} is the correct thing to use, for
arcane reasons. (Actually, reading the code, I suspect this
is not actually used by anything, but that's not important.)

> 2. How do I give the name ("Nobody") rather than VALUE => 2 in
> the next line?

You can actually do LimitOwner(VALUE => 'Nobody'), although the
doco doesn't clearly state that you can.

> 3. Does anyone have any pointers to documentation of the
> RT::*.pm modules? Or is it RTFS?

man RT::Tickets

etc.
-- 
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh at snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances



More information about the rt-users mailing list