From a30dcca536acc833d6323763485e3d63b1c37574 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Tue, 3 Apr 2012 11:16:16 -0400 Subject: [PATCH] Fix failure of 'My Selection Lists' interface Addresses this bug: https://bugs.launchpad.net/evergreen/+bug/967824 Recent changes to the mechanism of unified search (for which 'My Selection Lists' is a frontend) lacked code that respected the new join structure for some use cases. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Bill Erickson --- .../perlmods/lib/OpenILS/Application/Acq/Search.pm | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm index fdad64f916..109284ccf1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm @@ -267,14 +267,7 @@ sub add_au_joins { my $n = 0; foreach my $join (@_) { my ($hint, $attr, $num) = @$join; - my $start; - if ($hint eq "jub") { - $start = $from->{$hint}; - } elsif ($hint eq "acqinv") { - $start = $from->{"jub"}->{"acqie"}->{"join"}->{$hint}; - } else { - $start = $from->{"jub"}->{$hint}; - } + my $start = $from->{"acqus"}{$hint}; my $clause = { "class" => "au", "type" => "left", @@ -289,12 +282,8 @@ sub add_au_joins { } } }; - if ($hint eq "jub") { - $start->{"au$num"} = $clause; - } else { - $start->{"join"} ||= {}; - $start->{"join"}->{"au$num"} = $clause; - } + $start->{"join"} ||= {}; + $start->{"join"}->{"au$num"} = $clause; $n++; } $n; @@ -417,7 +406,7 @@ q/order_by clause must be of the long form, like: $and_terms = prepare_terms($and_terms, 1); $or_terms = prepare_terms($or_terms, 0) and do { - $query->{"from"}->{"jub"}->{"acqlia"} = { + $query->{"from"}{"acqus"}{"jub"}{"join"}{"acqlia"} = { "type" => "left", "field" => "lineitem", "fkey" => "id", }; }; -- 2.11.0