[Bps-public-commit] r9015 - RT-Extension-ActivityReports-Billing/html/Reports/Activity/Elements

tla at bestpractical.com tla at bestpractical.com
Wed Sep 12 11:55:19 EDT 2007


Author: tla
Date: Wed Sep 12 11:55:18 2007
New Revision: 9015

Modified:
   RT-Extension-ActivityReports-Billing/html/Reports/Activity/Elements/BillableActivityDetail

Log:
report billable activity only on resolved tickets

Modified: RT-Extension-ActivityReports-Billing/html/Reports/Activity/Elements/BillableActivityDetail
==============================================================================
--- RT-Extension-ActivityReports-Billing/html/Reports/Activity/Elements/BillableActivityDetail	(original)
+++ RT-Extension-ActivityReports-Billing/html/Reports/Activity/Elements/BillableActivityDetail	Wed Sep 12 11:55:18 2007
@@ -48,8 +48,11 @@
 }
 
 my $tickets = RT::Tickets->new($session{'CurrentUser'});
-$tickets->FromSQL(join " AND ", map {"($_)"} grep {/\S/} ($query, "Updated >= '$start' AND Updated <= '$end'"));
 my @items;
+
+# We only want those tickets that match the given parameters, and whose 
+# status is 'resolved'.
+$tickets->FromSQL(join " AND ", map {"($_)"} grep {/\S/} ($query, "Updated >= '$start' AND Updated <= '$end'", "Status = 'resolved'"));
 while (my $ticket = $tickets->Next) {
     my $txns = RelevantTxns( $ticket, start => $start, end => $end, query => $query, timed => 1 );
     while (my $txn = $txns->Next) {



More information about the Bps-public-commit mailing list