PATCH: bug in Search/Bulk.html

Hi,

Search/Bulk.html didn’t work for me and I could fix it with the
following (ugly) patch:

— share/html/Search/Bulk.html~ 2006-04-28 10:13:06.521180000 +0200
+++ share/html/Search/Bulk.html 2006-04-28 10:07:58.576804000 +0200
@@ -215,7 +215,7 @@

my $Tickets = RT::Tickets->new( $session{‘CurrentUser’} );
$Tickets->FromSQL($Query);
-$Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+#$Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
$Tickets->RowsPerPage($Rows) if ($Rows);
$Tickets->GotoPage( $Page - 1 ); # SB uses page 0 as the first page

Apparently $OrderBy is now more complex than just a field and should be
handled like in Elements/TicketList.

Cheers
David
David Schweikert | phone: +41 44 632 7019
System manager ISG.EE | walk: ETH Zentrum, ETL F24.1
ETH Zurich, Switzerland | web: http://people.ee.ethz.ch/dws

David Schweikert wrote:

Hi,

Search/Bulk.html didn’t work for me and I could fix it with the
following (ugly) patch:

That doesn’t seem quite right. Can you tell us a bit more about what you
were seeing, bugwise, as well as what exact RT you’re coming form?

Thanks!

signature.asc (191 Bytes)

Search/Bulk.html didn’t work for me and I could fix it with the
following (ugly) patch:

That doesn’t seem quite right. Can you tell us a bit more about what you
were seeing, bugwise, as well as what exact RT you’re coming form?

Indeed the patch is not the right fix but only a workaround.
I am using RT 3.6.0pre1 and I have seen that $OrderBy is set to
something like ‘id||||’ which would need to be expanded, like it is in
the Elements/TicketList component:

if ($OrderBy =~ /|/) {
# Multiple Sorts
my @OrderBy = split /|/,$OrderBy;
my @Order = split /|/,$Order;
$Collection->OrderByCols(
map { { FIELD => $OrderBy[$], ORDER => $Order[$] } } ( 0
… $#OrderBy ) );;
} else {
$Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
}

Cheers
David

— share/html/Search/Bulk.html~ 2006-04-28 10:13:06.521180000 +0200
+++ share/html/Search/Bulk.html 2006-04-28 10:07:58.576804000 +0200
@@ -215,7 +215,7 @@

my $Tickets = RT::Tickets->new( $session{‘CurrentUser’} );
$Tickets->FromSQL($Query);
-$Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+#$Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
$Tickets->RowsPerPage($Rows) if ($Rows);
$Tickets->GotoPage( $Page - 1 ); # SB uses page 0 as the first page

Apparently $OrderBy is now more complex than just a field and should be
handled like in Elements/TicketList.

Cheers
David
David Schweikert | phone: +41 44 632 7019
System manager ISG.EE | walk: ETH Zentrum, ETL F24.1
ETH Zurich, Switzerland | web: http://people.ee.ethz.ch/dws

Search/Bulk.html didn’t work for me and I could fix it with the
following (ugly) patch:

That doesn’t seem quite right. Can you tell us a bit more about what you
were seeing, bugwise, as well as what exact RT you’re coming form?

Indeed the patch is not the right fix but only a workaround.
I am using RT 3.6.0pre1 and I have seen that $OrderBy is set to
something like ‘id||||’ which would need to be expanded, like it is in
the Elements/TicketList component:

Got it. And The code below looks like much more of a right fix. And the
spreasheet output needs a similar fix. I’m putting them through tests
now. Thanks!