From 83987f2728e7ea9b3eeedfe60359ae0e402ccd98 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 28 Aug 2007 17:48:58 +0000 Subject: [PATCH] fixing query to look at all libs under depth for nearest hold stalling git-svn-id: svn://svn.open-ils.org/ILS/trunk@7728 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index f2d830712d..54f64f964b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -191,12 +191,12 @@ sub nearest_hold { "actor.org_unit_descendants($pl, $depth)" : "actor.org_unit_descendants($pl)" ; - my $ids = action::hold_request->db_Main->selectcol_arrayref(<<" SQL", {}, $cp, $age); + my $ids = action::hold_request->db_Main->selectcol_arrayref(<<" SQL", {}, $pl, $cp, $age); SELECT h.id FROM action.hold_request h JOIN action.hold_copy_map hm ON (hm.hold = h.id) JOIN $descendents d ON (d.id = h.pickup_lib) - JOIN actor.org_unit_proximity p ON (p.from_org = d.id AND p.to_org = h.pickup_lib) + JOIN actor.org_unit_proximity p ON (p.from_org = ? AND p.to_org = d.id) WHERE hm.target_copy = ? AND AGE(NOW(),h.request_time) >= CAST(? AS INTERVAL) AND h.capture_time IS NULL -- 2.11.0