[freeside-commits] freeside/httemplate/search timeworked.html, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Thu Sep 13 15:35:22 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv1827/httemplate/search

Modified Files:
	timeworked.html 
Log Message:
rename svc_acct_rt_transaction to acct_rt_transaction, as it is not a service, its something that hangs off of an svc_acct (like an acct_snarf).  thank goodness was able to do this before its any sort of migration problem...

Index: timeworked.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/timeworked.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- timeworked.html	16 Aug 2007 13:40:45 -0000	1.1
+++ timeworked.html	13 Sep 2007 22:35:20 -0000	1.2
@@ -55,9 +55,9 @@
 push @groupby, "oldvalue";
 push @groupby, "timetaken";
 
-my $appliedtimeclause = "coalesce (sum(svc_acct_rt_transaction.seconds), 0)";
+my $appliedtimeclause = "coalesce (sum(acct_rt_transaction.seconds), 0)";
 
-my $appliedtimeselect = "SELECT sum(seconds) FROM svc_acct_rt_transaction where transaction_id = transactions.id";
+my $appliedtimeselect = "SELECT sum(seconds) FROM acct_rt_transaction where transaction_id = transactions.id";
 push @groupby, "transactions.id";
 
 my $wheretimeleft = "($transactiontime != ($appliedtimeselect) OR ($appliedtimeselect) is NULL)";
@@ -68,7 +68,7 @@
 
 my $groupby = join(',', @groupby);
 
-my $query = "SELECT tickets.id,tickets.subject,to_char(transactions.created, 'Dy Mon DD HH24:MI:SS YYYY'),$transactiontime-$appliedtimeclause,transactions.id FROM transactions JOIN tickets ON transactions.objectid = tickets.id LEFT JOIN svc_acct_rt_transaction on transactions.id = svc_acct_rt_transaction.transaction_id WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft) GROUP BY $groupby ORDER BY transactions.created";
+my $query = "SELECT tickets.id,tickets.subject,to_char(transactions.created, 'Dy Mon DD HH24:MI:SS YYYY'),$transactiontime-$appliedtimeclause,transactions.id FROM transactions JOIN tickets ON transactions.objectid = tickets.id LEFT JOIN acct_rt_transaction on transactions.id = acct_rt_transaction.transaction_id WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft) GROUP BY $groupby ORDER BY transactions.created";
 my $count_query = "SELECT count(*) FROM transactions WHERE objecttype='RT::Ticket' AND ((transactions.type='Set' AND field='TimeWorked') OR transactions.type='Comment' OR transactions.type='Correspond') AND ($wheretimeleft)";
 
 </%init>



More information about the freeside-commits mailing list