[rt-users] Reverse the order of a ticket history (newest comments at top)
Jesse Vincent
jesse at bestpractical.com
Wed May 28 19:10:09 EDT 2003
Instead, why not look at OrderBy in DBIx::SearchBuilder's docs.
it's one line and a hell of a lot faster than manually reversing.
On Wed, May 28, 2003 at 03:46:54PM -0700, Ron Alexander wrote:
> This is what I have so far. I guess I am
> losing the reference to
> $Transaction. Can anybody offer help?
>
> Thanks,
> Ron
>
> code---
> <TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
> % @ah = ("<a name=\"lasttrans\">lastrans</a>");
> % while (my $Transaction = $Transactions->Next) {
> % my ($Ticket, $Transaction, $ShowHeaders, $Collapsed, $RowNum);
> % $ah[$i] = ({
> % Ticket => $Ticket,
> % Transaction => $Transaction,
> % ShowHeaders => $ShowHeaders,
> % Collapsed => $Collapsed,
> % RowNum => $RowNum,});
> % $i++;
> % }
>
> % $length = @ah;
> % while ($length > 0) {
> % my %hash1 = %{pop(@ah)};
> % $lTicket = $hash1{'Ticket'};
> % $Transaction = $hash1{'Transaction'};
> % $lTransaction = $hash1{'Transaction'};
> % $lShowHeaders = $hash1{'ShowHeaders'};
> % $lCollapsed = $hash1{'Collapsed'};
> % $lRowNum = $hash1{'RowNum'};
> <& ShowTransaction, Ticket => $lTicket, Transaction =>
> $lTransaction, ShowHeaders => $lShowHeaders, Collapsed => $lCollapsed,
> RowNum => $lRowNum &>
> % $i--;
> % }
> % $line = $ah[0];
> <%$line%>
> </TABLE>
> ------/code
>
>
> error: Error during compilation of
> /opt/rt2/local/WebRT/html/Ticket/Elements/ShowHistory:
> Global symbol "$Transaction" requires explicit package name at
> /opt/rt2/local/WebRT/html/Ticket/Elements/ShowHistory line 38.
> context:
> ...
> 34: % $length = @ah;
> 35: % while ($length > 0) {
> 36: % my %hash1 = %{pop(@ah)};
> 37: % $lTicket = $hash1{'Ticket'};
> 38: % $Transaction = $hash1{'Transaction'};
> 39: % $lTransaction = $hash1{'Transaction'};
> 40: % $lShowHeaders = $hash1{'ShowHeaders'};
> 41: % $lCollapsed = $hash1{'Collapsed'};
> 42: % $lRowNum = $hash1{'RowNum'};
> ...
> code stack: /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm:600
> /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm:328
> /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm:849
> /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm:947
> /opt/rt2/WebRT/html/Ticket/Display.html:13
> /opt/rt2/WebRT/html/autohandler:58
>
> --
> /************************************************************
> * Ron Alexander ralexander at musiciansfriend.com *
> * Programmer/Analyst Musician's Friend, Inc.*
> * Phone:(541)774-5362 http://www.musiciansfriend.com *
> ************************************************************/
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>
--
http://www.bestpractical.com/rt -- Trouble Ticketing. Free.
More information about the rt-users
mailing list