From a8e9e6f51a6fad468ef73255ef5e5dfc5163db16 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 23 Sep 2009 16:46:32 +0000 Subject: [PATCH] SQL thinko causing over-zealous reshelving of copies not yet out of their delay time. Problem spotted and fix suggested by Bill Ott of GRPL. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14124 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../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 bb8ba736b9..0d28e6a6f4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -152,8 +152,8 @@ sub complete_reshelving { FROM $cp cp LEFT JOIN $setting setting ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval') - LEFT JOIN $circ circ ON (circ.target_copy = cp.id AND circ.id IS NULL) - WHERE cp.status = 7 + LEFT JOIN $circ circ ON (circ.target_copy = cp.id) + WHERE cp.status = 7 AND circ.id IS NULL AND cp.create_date < NOW() - CAST( COALESCE( BTRIM( setting.value,'"' ), ? ) AS INTERVAL) ) SQL -- 2.43.2