[Rt-devel] RT 3.6.0pre - Listings disappering from RT at a glance
Ruslan Zakirov
ruslan.zakirov at gmail.com
Fri Mar 24 16:43:29 EST 2006
On 3/24/06, Rangarajan Radhakrishnan <rangarajan.radhakrishnan at bms.com> wrote:
> 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
Yep, fix is in another revision but anyway problem is fixed in the RT-3.4 svn.
> 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 think this patch should work too, but RT uses old DBIx::SB API in
other places and that was more correct to fix RT instead of changing
SB.
You could cleanup patch a little and send it to rt-devel@ list in diff
-u format.
>
> 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;
> > }
>
>
>
> _______________________________________________
> List info:
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
> Best Practical is hiring! Come hack Perl for us:
> http://bestpractical.com/about/jobs.html
>
>
--
Best regards, Ruslan.
More information about the Rt-devel
mailing list