%# Dare to be naive. %# -- R. Buckminster Fuller
<&|/l&>Overview <&|/l&>Pending issues <&|/l&>Resolved issues

  • <&|/l&>Admins: <% $QueueObj->AdminCc->MembersObj->Count || 0 %>
  • <&|/l&>Members: <% $QueueObj->Cc->MembersObj->Count || 0 %>
  • <&|/l&>Download #: <% $QueueObj->Attribute('Download') || 0 %>
  • <&|/l&>Requested issues: <% $req || 0 %>
  • <&|/l&>Resolved issues: <% $res || 0 %>
  • <&|/l&>Source checkin: <% $checkin %>
  • <&|/l&>Source checkout: <&|/l&>n/a

% foreach my $type (qw(defect patch task feature enhancement), 'Total #') { % my $t = lc($type); $t =~ s/ .*//; % foreach my $status (qw(pending resolved total)) { % } % }
<&|/l&>Tracker Statistics
  <&|/l&>Pending <&|/l&>Resolved <&|/l&>Total #
<% loc($type) %> <% $stat{$status}{$t} || 0 %>
<& ByName, Data => $by_name{pending} &> <& ByName, Data => $by_name{resolved} &>
<%INIT> my $TicketsObj = RT::Tickets->new($session{CurrentUser}); $TicketsObj->LimitQueue(VALUE => $QueueObj->Id); $TicketsObj->LimitStatus(OPERATOR => '!=', VALUE => 'deleted'); my $req = $TicketsObj->Count; my (%by_name, %stat); while (my $TicketObj = $TicketsObj->Next) { my $RequestorObj = $TicketObj->FirstRequestor or next; my $type = $TicketObj->CustomFieldValue('Type') or next; my $name = $RequestorObj->Name or next; next if $name eq 'RT_System'; my $status = (RT::Queue->IsActiveStatus($TicketObj->Status)) ? 'pending' : 'resolved'; $by_name{$status}{$name}++; $stat{$status}{$type}++; $stat{$status}{total}++; $stat{total}{$type}++; $stat{total}{total}++; } $TicketsObj = RT::Tickets->new($session{CurrentUser}); $TicketsObj->LimitQueue(VALUE => $QueueObj->Id); $TicketsObj->LimitStatus(VALUE => $_) for grep !/deleted/, RT::Queue->InactiveStatusArray; my $res = $TicketsObj->Count; require LWP::Simple; my $src = eval { $m->scomp('/Foundry/Project/Source/index.html', QueueObj => $QueueObj) }; my $checkin = loc('n/a'); $checkin = ($1 - 1) if $src =~ /of revision (\d+)/; <%ARGS> $QueueObj