From: mkanat%kerio.com <> Date: Thu, 28 Jul 2005 13:20:12 +0000 (+0000) Subject: Bug 293678: Sorting bug list by Assignee Real Name failing in latest nightly X-Git-Tag: bugzilla-2.20rc2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f768c154ad3ba9a4de39e9f724c5a8587756f4b;p=thirdparty%2Fbugzilla.git Bug 293678: Sorting bug list by Assignee Real Name failing in latest nightly Patch By Max Kanat-Alexander r=wurblzap, a=justdave --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index ba06e475b7..098cca7edb 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1304,6 +1304,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.