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

Binand Raj S. binand at gmx.net
Mon Dec 23 06:53:21 EST 2002


Hi All,

I am new to RT2 hacking - just trying to get my feet wet. :)

I am trying to add a box that displays the oldest 25 unowned
tickets. I added an Elements/Orphans file, added a link in
index.html, and things are working fine so far. But I have
to hardcode the Id of Nobody in my code. :(

This is what it looks like:

<%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).

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

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

RT is 2.0.13, Apache with mod_fastcgi on Redhat 7.2+updates.

Thanks,

Binand




More information about the rt-users mailing list