From 966c262164d7dd68686862fa827d0dfde2132b69 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Thu, 28 Jul 2005 13:19:13 +0000 Subject: Bug 293678: Sorting bug list by Assignee Real Name failing in latest nightly Patch By Max Kanat-Alexander r=wurblzap, a=justdave --- Bugzilla/Search.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Bugzilla/Search.pm') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index e7b7739be..7e545cf46 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1308,6 +1308,13 @@ sub init { # to other parts of the query, so we want to create it before we # write the FROM clause. foreach my $orderitem (@inputorder) { + # Some fields have 'AS' aliases. The aliases go in the ORDER BY, + # not the whole fields. + # XXX - Ideally, we would get just the aliases in @inputorder, + # and we'd never have to deal with this. + if ($orderitem =~ /\s+AS\s+(.+)$/i) { + $orderitem = $1; + } BuildOrderBy($orderitem, \@orderby); } # Now JOIN the correct tables in the FROM clause. -- cgit v1.2.3-24-g4f1b