[rt-users] change the order of the history

darren chamberlain darren at boston.com
Thu Oct 10 15:09:43 EDT 2002


* Travis Zadikem <tzadikem at yahoo.com> [2002-10-10 13:38]:
> I was wondering if anyone knows where I would change the order of the
> history of the ticket so that all the new history is at the top of the
> ticket instead of at the bottom of the ticket like it is now. 

Try the attached patch to WebRT/html/Tickets/Elements/ShowHistory
(against CVS).  This is untested.

(darren)

-- 
There are trivial truths and there are great Truths. The opposite of a
trival truth is obviously false. The opposite of a great Truth is also
true.
    -- Neils Bohr
-------------- next part --------------
Index: ShowHistory
===================================================================
RCS file: /raid/cvsroot/rt/webrt/Ticket/Elements/ShowHistory,v
retrieving revision 1.3
diff -c -w -d -w -u -p -r1.3 ShowHistory
--- ShowHistory	28 Jan 2002 06:01:46 -0000	1.3
+++ ShowHistory	10 Oct 2002 19:08:37 -0000
@@ -19,7 +19,8 @@
 </TABLE>
 
 <TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
-% while (my $Transaction = $Transactions->Next) {
+% while (@Transactions) {
+% 	my $Transaction = shift @Transactions;   
 % $i++;
 %	if ($Transactions->IsLast) {
 	<a name="lasttrans"></a>
@@ -30,8 +31,11 @@
 <%INIT>
 
 my $Transactions = $Ticket->Transactions;
-my $i;
+my ($i, @Transactions);
 
+while (my $Transaction = $Transactions->Next) {
+    unshift @Transactions, $Transaction;
+}
 
 </%INIT>
 <%ARGS>


More information about the rt-users mailing list