<html>
<head>
<link rel="stylesheet" href="/NoAuth/webrt.css" type="text/css">
<title>Buglist</title>
</head>
<body>
<h1> Current new and open tickets.</h1>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=3 border=0>
<%PERL>
my $tickets = new RT::Tickets($user);
$tickets->LimitStatus(VALUE => 'open');
$tickets->LimitStatus(VALUE => 'new');
$tickets->OrderBy(FIELD => 'id', ALIAS => 'main', ORDER => 'ASC');
</%PERL>
% if ($tickets->Count) {
<TR>
<TD BGCOLOR=#336699><FONT COLOR="#FFFFFF" size=+1>
<b>Subject<b>
</FONT>
</TD>
<TD BGCOLOR=#336699><FONT COLOR="#FFFFFF" size=+1>
<b>Status<b>
</TD>
<TD BGCOLOR=#336699><FONT COLOR="#FFFFFF" size=+1>
<b>Queue<b>
</TD>
<TD BGCOLOR=#336699><FONT COLOR="#FFFFFF" size=+1>
<b>Room<b>
</TD>
</TR>
%while (my $ticket = $tickets->Next) {
% $i++;
% my $room = $ticket->CustomFieldValues($room_sel->id)->First;
<TR
% if ($i%2) {
BGCOLOR="#eeeeee"
%}
>
<TD>
<%$ticket->Id%>
<%$ticket->Subject%>
</TD>
<TD>
<%$ticket->Status%>
</TD>
<TD>
<%$ticket->QueueObj->Name%>
</TD>
<TD
<%$room&&$room->Content%>
</TD>
</TR>
% }
% }
</TABLE>
</body>
</html>
<%INIT>
my $user = new RT::CurrentUser('guest');
my $queue = new RT::Queue($user);
my $i;
my $room_sel= RT::CustomField->new($user);
$room_sel->LoadByNameAndQueue(Name =>'Room', Queue => $queue->Id);
</%INIT>