From: miker Date: Wed, 23 Sep 2009 16:48:26 +0000 (+0000) Subject: SQL thinko causing over-zealous reshelving of copies not yet out of their delay time... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c91b44cf0beab3cf91e4b6948a77acbbf67e5092;p=Evergreen.git 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/branches/rel_1_4@14128 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 b81032d982..96ac4c3e2e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -149,8 +149,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