<%= my $col1 = $stripe1_bgcolor || "#ffffff"; my $col2 = $stripe2_bgcolor || "#dddddd"; my $col = $col1; my $can_set_priority = grep { exists($_->{'_selfservice_priority'}) } @tickets; if ( $can_set_priority ) { $OUT .= qq!! . qq!!; } $date_format ||= '%Y-%m-%d'; my $date_formatter = sub { my $time = Date::Parse::str2time($_[0], 'GMT'); # RT internal dates are GMT # exclude times within 24 hours of zero ($time > 86400) ? Date::Format::time2str($date_format, $time) : '' }; my @titles = ('#', qw(Subject Queue Status Created Due)); push @titles, 'Estimated
Hours'; push @titles, 'Priority'; $box_bgcolor ||= '#c0c0c0'; my $th = qq($th> " } @titles) . ''; foreach my $ticket ( @tickets ) { my $id = $ticket->{'id'}; my $td = qq!'; my $link = qq!!; $OUT .= '' . $td. $link . $id . ''. $space . $td. $link . $ticket->{'subject'} . ''. $space . $td. $ticket->{'queue'} . ''. $space . $td. $ticket->{'status'} . ''. $space . $td. $date_formatter->($ticket->{'created'}) . ''. $space . $td. $date_formatter->($ticket->{'due'}) . ''. $space . qq!'. $space . qq!'; if ( exists($ticket_error{$id}) ) { # display error message compactly $OUT .= $td. '*'; } else { $OUT .= $td.''; } } else { $OUT .= ($ticket->{'content'} || $ticket->{'priority'}) . ''. $td.''; } $OUT .= ''; $col = $col eq $col1 ? $col2 : $col1; } #foreach my $ticket if ( $can_set_priority ) { $OUT .= ''; } %>
Open Tickets
$_
!; my $space = $td.' 
!. ($ticket->{'timeestimated'} ? sprintf('%.1f', $ticket->{'timeestimated'} / 60.0) # .1f? : '' ) . '!; if ( $can_set_priority ) { $OUT .= '' . '