[Rt-commit] r4304 - in RT-Extension-ActivityReports: . html/Tools
jesse at bestpractical.com
jesse at bestpractical.com
Tue Dec 13 16:03:36 EST 2005
Author: jesse
Date: Tue Dec 13 16:03:34 2005
New Revision: 4304
Added:
RT-Extension-ActivityReports/html/Tools/ResolutionComments.html
Modified:
RT-Extension-ActivityReports/ (props changed)
RT-Extension-ActivityReports/Makefile.PL
Log:
r20431 at truegrounds: jesse | 2005-12-13 16:02:34 -0500
* Added the last report
Modified: RT-Extension-ActivityReports/Makefile.PL
==============================================================================
--- RT-Extension-ActivityReports/Makefile.PL (original)
+++ RT-Extension-ActivityReports/Makefile.PL Tue Dec 13 16:03:34 2005
@@ -2,5 +2,6 @@
RTx('RT-Extension-ActivityReports');
license('perl');
+requires('Time::Duration');
author('Alex Vandiver <alexmv at bestpractical.com>');
&WriteAll;
Added: RT-Extension-ActivityReports/html/Tools/ResolutionComments.html
==============================================================================
--- (empty file)
+++ RT-Extension-ActivityReports/html/Tools/ResolutionComments.html Tue Dec 13 16:03:34 2005
@@ -0,0 +1,67 @@
+<& /Elements/Header, Title => loc("Activity detail") &>
+<& Elements/Tabs,
+ current_tab => "Tools/ResolutionComments.html",
+ Title => loc("Activity detail") &>
+
+
+<table style="width: 100%">
+<tr>
+<th>Queue</th><th>Ticket #</th><th>Created</th><th>Resolved</th><th>Time to resolve</th>
+</tr>
+<tr>
+<th colspan="5">Resolution comments</th>
+</tr>
+% for my $item (@items) {
+<tr>
+<td><% $item->{queue} %></td>
+<td><% $item->{id} %></td>
+<td><% $item->{created} %></td>
+<td><% $item->{resolved} %></td>
+<td><% $item->{duration} %></td>
+</tr>
+<tr>
+<td colspan="5"><% $item->{whiteboard} %></td>
+</tr>
+% }
+</table>
+
+<form action="ResolutionComments.html" method="POST" enctype="multipart/form-data">
+<textarea name="query"><% $query %></textarea>
+<& /Elements/Submit, Name => 'LimitReport', Label => loc('Limit') &>
+</form>
+<%args>
+$query => 'id > 0'
+$start => "'2005/01/01'"
+$end => "'2006/01/01'"
+</%args>
+<%init>
+
+use Time::Duration;
+
+my $summary_tickets = RT::Tickets->new( $session{'CurrentUser'} );
+$summary_tickets->FromSQL(
+ $query . " AND (Status = 'resolved')" );
+
+my @items;
+while ( my $ticket = $summary_tickets->Next ) {
+ push @items, {
+ queue => $ticket->QueueObj->Name,
+ id => $ticket->id,
+ created => $ticket->CreatedObj->AsString,
+ resolved => $ticket->ResolvedObj->AsString,
+ duration => Time::Duration::concise(
+ Time::Duration::duration(
+ $ticket->ResolvedObj->Unix - $ticket->CreatedObj->Unix
+ )
+ ),
+ whiteboard => $ticket->FirstCustomFieldValue('Whiteboard')
+ };
+}
+
+ at items = sort { $a->{queue} cmp $b->{queue} || $a->{id} <=> $b->{id} } @items;
+
+
+
+
+
+</%init>
More information about the Rt-commit
mailing list