[rt-users] Changing sort order of Ticket history

Ron Alexander ralexander at musiciansfriend.com
Tue May 13 18:23:37 EDT 2003


I have looked in the archives and RTFM and despite the appearance of the
question in multiple threads I can't find an answer.

I(my boss) want the history to appear with the most recent
comment/correspondence at the top of the history list. I found what I
believe to be the appropriate snippet of code in
WebRT/html/Ticket/Elements/ShowHistory and tried the following
modification:
ln 22-25 ShowHistory
-% while (my $Transaction = $Transactions->Next) {
+% while (my $Transaction = $Transactions->Previous) {
-% $i++;
+% $i--;
-%       if ($Transactions->IsLast) {
+%       if ($Transactions->IsFirst) {
-        <a name="lasttrans"></a>
+        <a name="firsttrans"></a>

This doesn't work for what I guess are pretty obvious reasons. I created
a couple methods on the $Transactions object out of thin air. I think I
would need to change them in lib/RT/Transactions.pm but I can't seem to
find methods in there for Next either.

Can anyone give me a few pointers or the hack if it is done already?

Thanks a bundle,
Ron


-- 
/************************************************************
* Ron Alexander             ralexander at musiciansfriend.com *
* Programmer/Analyst                Musician's Friend, Inc.*
* Phone:(541)774-5362       http://www.musiciansfriend.com *
************************************************************/




More information about the rt-users mailing list