X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Ftimeworked.html;h=fa4b895397d3127d06709a275d4132eb11a75e19;hb=e55892bdf6dc95710a19876087690a9664421215;hp=1d877e6ef219039862d5d5b9074f1f1d114bad68;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/search/timeworked.html b/httemplate/search/timeworked.html index 1d877e6ef..fa4b89539 100644 --- a/httemplate/search/timeworked.html +++ b/httemplate/search/timeworked.html @@ -1,4 +1,4 @@ -<% include( 'elements/search.html', +<& elements/search.html, 'title' => 'Time Worked', 'name' => 'time', 'html_form' => qq!
!, @@ -33,9 +33,8 @@ '', ], 'html_foot' => $html_foot, - ) - -%> + +&> <%init> die "access denied" @@ -45,12 +44,14 @@ my @groupby = (); my $transactiontime = " CASE Transactions.Type WHEN 'Set' - THEN (TO_NUMBER(NewValue,'999999')-TO_NUMBER(OldValue, '999999')) * 60 + THEN ( CASE WHEN NewValue = '' THEN 0 ELSE TO_NUMBER(NewValue,'999999') END + -TO_NUMBER(OldValue, '999999') + ) * 60 ELSE TimeTaken*60 END "; -push @groupby, qw( transactions.type newvalue oldvalue timetaken ); +push @groupby, qw( Transactions.Type NewValue OldValue TimeTaken ); my $appliedtimeclause = "COALESCE (SUM(acct_rt_transaction.seconds), 0)"; @@ -76,9 +77,7 @@ my $groupby = join(',', @groupby); my $where = " WHERE ObjectType='RT::Ticket' AND ( ( Transactions.Type='Set' AND Field='TimeWorked' ) - OR Transactions.Type='Create' - OR Transactions.Type='Comment' - OR Transactions.Type='Correspond' + OR Transactions.Type IN ( 'Create', 'Comment', 'Correspond', 'Touch' ) ) AND $wheretimeleft ";