From 247d9388137e2a5aa2ace2e72d13c733e49961b5 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 21 Aug 2007 13:24:38 +0000 Subject: [PATCH] add proximity limiting to hold soft stalling git-svn-id: svn://svn.open-ils.org/ILS/trunk@7710 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 5 +++-- 1 file changed, 3 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 4d7a79ec11..39f0b4ea48 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -184,19 +184,20 @@ sub nearest_hold { my $cp = shift; my $limit = int(shift()) || 10; my $age = shift() || '0'; + my $prox = shift() || 0; my $age_where = ''; if ($age) { $age_where = " - my $ids = action::hold_request->db_Main->selectcol_arrayref(<<" SQL", {}, $cp, $pl, $age); + my $ids = action::hold_request->db_Main->selectcol_arrayref(<<" SQL", {}, $cp, $pl, $age, $prox); SELECT h.id FROM action.hold_request h JOIN action.hold_copy_map hm ON (hm.hold = h.id) JOIN actor.org_unit_proximity p ON (p.from_org = h.pickup_lib) WHERE hm.target_copy = ? AND p.to_org = ? - AND h.request_time + ? < NOW() + AND (h.request_time + ? < NOW() OR p.prox <= ?) AND h.capture_time IS NULL AND h.cancel_time IS NULL ORDER BY -- 2.11.0