[Rt-devel] RT 3.6.0pre - Listings disappering from RT at a glance

Rangarajan Radhakrishnan rangarajan.radhakrishnan at bms.com
Fri Mar 24 13:49:54 EST 2006


Jim Meyer wrote:

>On Thu, 2006-03-23 at 17:46 -0500, Rangarajan Radhakrishnan wrote:
>  
>
>>Would like to know if anybody has experienced this? I am new to RT.
>>Located the place in SearchBuilder.pm where the problem was (in 3.5.7)
>>but not sure where to fix it or whether there is some other issue? 
>>    
>>
>
>I think this is fixed in SVN. See:
>
>    http://www.gossamer-threads.com/lists/rt/devel/54099#54099
>
>Cheers!
>
>--j
>  
>
Jim - The thread you mentioned does not seem to fix this. I think the 
SearchBuilder.pm breaks down when you go to edit the options for 
displaying ("10 highest priority tickets I own" or "10 newest unowned 
tickets"). When the options are edited and any change is made to "Order 
by" dropdowns, it results in _OrderClause method of SearchBuilder.pm 
getting impacted.  
The values of rowhash hash (corresponding to keys 'ALIAS', 'FIELD' and 
'ORDER') are no longer scalars but ARRAY references.
The following appears to fix this:
SearchBuilder.pm.20060321 - SearchBuilder.pm version 1.40 downloaded 
from CPAN.
SearchBuilder.pm          - Version I modified.

I had exported 
PERL5LIB="/home/radhakrr/perl/lib/perl5/5.8.6:/home/radhakrr/perl/lib/perl5/site_perl/5.8.6"
so that my modified SearchBuilder got picked up first before the one in 
/usr/lib/perl5/.....
 
/home/radhakrr/perl/lib/perl5/site_perl/5.8.6/DBIx>diff   
SearchBuilder.pm.20060321 SearchBuilder.pm | more
1075a1076
 >
1086,1096c1087,1111
<
<           if ($rowhash{'FIELD'} =~ /^(\w+\()(.*\))$/) {
<               # handle 'FUNCTION(FIELD)' formatted fields
<               $rowhash{'ALIAS'} = $1 . $rowhash{'ALIAS'};
<               $rowhash{'FIELD'} = $2;
<           }
<
<             $clause .= ($clause ? ", " : " ");
<             $clause .= $rowhash{'ALIAS'} . ".";
<             $clause .= $rowhash{'FIELD'} . " ";
<             $clause .= $rowhash{'ORDER'};
---
 >
 >             my (@tmp_alias, @tmp_field, @tmp_order);
 >             my ($tmp_alias, $tmp_field, $tmp_order);
 >             my $prev_valid_alias;
 >
 >             @tmp_alias = (ref($rowhash{'ALIAS'}) eq "ARRAY") ? 
@{$rowhash{'ALIAS'}} : ($rowhash{'ALIAS'});
 >             @tmp_field = (ref($rowhash{'FIELD'}) eq "ARRAY") ? 
@{$rowhash{'FIELD'}} : ($rowhash{'FIELD'});
 >             @tmp_order = (ref($rowhash{'ORDER'}) eq "ARRAY") ? 
@{$rowhash{'ORDER'}} : ($rowhash{'ORDER'});
 >
 >             for my $i (0..$#tmp_field)
 >             {
 >                 ($tmp_alias, $tmp_field, $tmp_order) = 
($tmp_alias[$i], $tmp_field[$i], $tmp_order[$i]);
 >
 >                 next if ($tmp_field =~ /^\s*$/);
 >               if ($tmp_field =~ /^(\w+\()(.*\))$/) {
 >                   # handle 'FUNCTION(FIELD)' formatted fields
 >                   $tmp_alias = $1 . $tmp_alias;
 >                   $tmp_field = $2;
 >               }
 >
 >                 $clause .= ($clause ? ", " : " ");
 >                 $clause .= $tmp_alias . "." if ($tmp_alias =~ /^\w+$/);
 >                 $clause .= $tmp_field . " ";
 >                 $clause .= $tmp_order;
 >             }


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060324/69a8c4c3/attachment.htm


More information about the Rt-devel mailing list