<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body>
Jim Meyer wrote:<br>
<blockquote cite="mid1143158300.14015.39.camel@zodiac.pdi.com"
type="cite">
<pre wrap="">On Thu, 2006-03-23 at 17:46 -0500, Rangarajan Radhakrishnan wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap=""><!---->
I think this is fixed in SVN. See:
<a class="moz-txt-link-freetext" href="http://www.gossamer-threads.com/lists/rt/devel/54099#54099">http://www.gossamer-threads.com/lists/rt/devel/54099#54099</a>
Cheers!
--j
</pre>
</blockquote>
<tt>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. <br>
The values of rowhash hash (corresponding to keys 'ALIAS', 'FIELD' and
'ORDER') are no longer scalars but ARRAY references.<br>
The following appears to fix this:<br>
</tt><tt>SearchBuilder.pm.20060321 - SearchBuilder.pm version 1.40
downloaded from CPAN.<br>
</tt><span class="right"></span><tt>SearchBuilder.pm - Version
I modified.<br>
<br>
I had exported
PERL5LIB="/home/radhakrr/perl/lib/perl5/5.8.6:/home/radhakrr/perl/lib/perl5/site_perl/5.8.6"<br>
so that my modified SearchBuilder got picked up first before the one in
/usr/lib/perl5/.....<br>
</tt><tt> <br>
/home/radhakrr/perl/lib/perl5/site_perl/5.8.6/DBIx>diff
SearchBuilder.pm.20060321 SearchBuilder.pm | more<br>
1075a1076<br>
><br>
1086,1096c1087,1111<br>
<<br>
< if ($rowhash{'FIELD'} =~ /^(\w+\()(.*\))$/) {<br>
< # handle 'FUNCTION(FIELD)' formatted fields<br>
< $rowhash{'ALIAS'} = $1 . $rowhash{'ALIAS'};<br>
< $rowhash{'FIELD'} = $2;<br>
< }<br>
<<br>
< $clause .= ($clause ? ", " : " ");<br>
< $clause .= $rowhash{'ALIAS'} . ".";<br>
< $clause .= $rowhash{'FIELD'} . " ";<br>
< $clause .= $rowhash{'ORDER'};<br>
---<br>
><br>
> my (@tmp_alias, @tmp_field, @tmp_order);<br>
> my ($tmp_alias, $tmp_field, $tmp_order);<br>
> my $prev_valid_alias;<br>
><br>
> @tmp_alias = (ref($rowhash{'ALIAS'}) eq "ARRAY") ?
@{$rowhash{'ALIAS'}} : ($rowhash{'ALIAS'});<br>
> @tmp_field = (ref($rowhash{'FIELD'}) eq "ARRAY") ?
@{$rowhash{'FIELD'}} : ($rowhash{'FIELD'});<br>
> @tmp_order = (ref($rowhash{'ORDER'}) eq "ARRAY") ?
@{$rowhash{'ORDER'}} : ($rowhash{'ORDER'});<br>
><br>
> for my $i (0..$#tmp_field)<br>
> {<br>
> ($tmp_alias, $tmp_field, $tmp_order) =
($tmp_alias[$i], $tmp_field[$i], $tmp_order[$i]);<br>
><br>
> next if ($tmp_field =~ /^\s*$/);<br>
> if ($tmp_field =~ /^(\w+\()(.*\))$/) {<br>
> # handle 'FUNCTION(FIELD)' formatted fields<br>
> $tmp_alias = $1 . $tmp_alias;<br>
> $tmp_field = $2;<br>
> }<br>
><br>
> $clause .= ($clause ? ", " : " ");<br>
> $clause .= $tmp_alias . "." if ($tmp_alias =~
/^\w+$/);<br>
> $clause .= $tmp_field . " ";<br>
> $clause .= $tmp_order;<br>
> }<br>
</tt><br>
<br>
</body>
</html>