[Rt-commit] r14568 - in rt/3.8/trunk: .
elacour at bestpractical.com
elacour at bestpractical.com
Mon Jul 28 10:04:19 EDT 2008
Author: elacour
Date: Mon Jul 28 10:03:53 2008
New Revision: 14568
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Ticket/Elements/ShowHistory
Log:
r10261 at datura: manu | 2008-07-28 16:03:03 +0200
Take care of $OldestTransactionsFirst when taging transactions with "lasttrans"
in ticket history.
Thanks to Eynat Nir Mishor.
Modified: rt/3.8/trunk/share/html/Ticket/Elements/ShowHistory
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Elements/ShowHistory (original)
+++ rt/3.8/trunk/share/html/Ticket/Elements/ShowHistory Mon Jul 28 10:03:53 2008
@@ -103,6 +103,13 @@
grep { ($_->TransactionId == $Transaction->Id ) && ($trans_content->{$_->Id} = $_) } @attachment_content;
+ my $IsLastTransaction = 0;
+ if ( $OldestFirst ) {
+ $IsLastTransaction = $Transactions->IsLast;
+ } else {
+ $IsLastTransaction = 1 if ( $i == 1 );
+ }
+
#Args is first because we're clobbering the "Attachments" parameter
$m->comp( 'ShowTransaction',
%ARGS,
@@ -113,7 +120,7 @@
RowNum => $i,
Attachments => \@trans_attachments,
AttachmentContent => $trans_content,
- LastTransaction => $Transactions->IsLast
+ LastTransaction => $IsLastTransaction
);
# manually flush the content buffer after each txn, so the user sees
@@ -139,11 +146,11 @@
my $OldestFirst = RT->Config->Get( 'OldestTransactionsFirst', $session{'CurrentUser'} );
-$OldestFirst = $OldestFirst? 'ASC': 'DESC';
+my $SortOrder = $OldestFirst? 'ASC': 'DESC';
$Transactions->OrderByCols( { FIELD => 'Created',
- ORDER => $OldestFirst },
+ ORDER => $SortOrder },
{ FIELD => 'id',
- ORDER => $OldestFirst },
+ ORDER => $SortOrder },
);
my $i;
More information about the Rt-commit
mailing list