[rt-users] Reverse the order of a ticket history (newest comments at top)

Ron Alexander ralexander at musiciansfriend.com
Wed May 28 18:46:54 EDT 2003


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 *
************************************************************/




More information about the rt-users mailing list