diff options
author | ivan <ivan> | 2010-06-15 06:40:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-15 06:40:03 +0000 |
commit | 50de3921a10ae2ecc890c8661aa772dce72f0c53 (patch) | |
tree | d3f222a3606c48bb1f9a55e422bba8d775670bbb /httemplate | |
parent | 67511a3e20259252288f0671c839fd1773627768 (diff) |
ticket # and account(customer) options for time worked report
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/search/rt_transaction.html | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/httemplate/search/rt_transaction.html b/httemplate/search/rt_transaction.html index d1097c1fe..8dda4baea 100644 --- a/httemplate/search/rt_transaction.html +++ b/httemplate/search/rt_transaction.html @@ -54,8 +54,9 @@ my $transactiontime = " "; my $join = 'JOIN Tickets ON Transactions.ObjectId = Tickets.Id '. - 'JOIN Users ON Transactions.Creator = Users.Id '; - + 'JOIN Users ON Transactions.Creator = Users.Id '. + 'LEFT JOIN acct_rt_transaction '. + ' ON Transactions.Id = acct_rt_transaction.transaction_id'; my $where = " WHERE objecttype='RT::Ticket' AND ( ( Transactions.Type = 'Set' @@ -96,15 +97,13 @@ my $query = { 'select' => "Transactions.*, Tickets.Id AS ticketid, Tickets.Subject, Users.name as otaker, $transactiontime AS transaction_time, acct_rt_transaction.support", #'table' => 'Transactions', 'table' => 'transactions', - 'addl_from' => $join. - 'LEFT JOIN acct_rt_transaction '. - ' ON Transactions.Id = acct_rt_transaction.transaction_id', + 'addl_from' => $join, 'extra_sql' => $where, 'order by' => 'ORDER BY Created', }; my $count_query = - "SELECT COUNT(*), SUM($transactiontime), SUM(support) FROM Transactions $join $where"; + "SELECT COUNT(*), SUM($transactiontime), SUM(acct_rt_transaction.support) FROM Transactions $join $where"; my $link = [ "${p}rt/Ticket/Display.html?id=", sub { shift->get('ticketid'); } ]; |