From: Ivan Kohler Date: Thu, 9 Oct 2014 04:41:28 +0000 (-0700) Subject: Merge branch 'master' of git.freeside.biz:/home/git/freeside X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3146245f510ef873c4176bc06dc891f990db8f1e Merge branch 'master' of git.freeside.biz:/home/git/freeside --- 3146245f510ef873c4176bc06dc891f990db8f1e diff --cc httemplate/search/rt_transaction.html index c9a305f03,71a266961..aace4e9b2 --- a/httemplate/search/rt_transaction.html +++ b/httemplate/search/rt_transaction.html @@@ -56,10 -56,21 +56,22 @@@ my @select = ); my @select_total = ( 'COUNT(*)' ); -my ($transaction_time, $applied_time); +my $transaction_time; +my $applied_time = ''; 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 ( + SELECT DISTINCT ON (ObjectId) + ObjectId, Content + FROM ObjectCustomFieldValues + JOIN CustomFields + ON (ObjectCustomFieldValues.CustomField = CustomFields.Id) + WHERE CustomFields.Name = 'TimeType' + AND ObjectCustomFieldValues.ObjectType = 'RT::Ticket' + AND ObjectCustomFieldValues.Disabled = 0 + ORDER BY ObjectId ASC, ObjectCustomFieldValues.LastUpdated DESC + ) AS ocfv_TimeType ON (Tickets.Id = ocfv_TimeType.ObjectId) + "; my $where = "WHERE Transactions.ObjectType = 'RT::Ticket'";