[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 01d657732f2f178fe793fb0927ab570d4e6e9ce8

Evergreen Git git at git.evergreen-ils.org
Wed Nov 23 16:31:38 EST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_0 has been updated
       via  01d657732f2f178fe793fb0927ab570d4e6e9ce8 (commit)
      from  0835669b59047e2820fceabe4e6923fbbee2c524 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 01d657732f2f178fe793fb0927ab570d4e6e9ce8
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Nov 23 15:14:32 2011 -0500

    Fix for LP894125 - reshelving interval
    
    Update to reshelving code to utilize actor.org_unit_ancestor_setting function
    and properly retrieve org settings for "circ.reshelving_complete.interval" for
    org unit or ancestors.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

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 2d690d9..d63100c 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
@@ -146,7 +146,6 @@ sub complete_reshelving {
 	throw OpenSRF::EX::InvalidArg ("I need an interval of more than 0 seconds!")
 		unless (interval_to_seconds( $window ));
 
-	my $setting = actor::org_unit_setting->table;
 	my $cp = asset::copy->table;
 
 	my $sql = <<"	SQL";
@@ -155,14 +154,12 @@ sub complete_reshelving {
 		  WHERE	id IN (
             SELECT cp.id 
             FROM  $cp cp
-                LEFT JOIN $setting setting
-                    ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval')
             WHERE cp.status = 7
-                AND cp.status_changed_time < NOW() - CAST( COALESCE( BTRIM( setting.value,'"' ), ? )  AS INTERVAL)
+                AND cp.status_changed_time < NOW() - CAST( COALESCE( BTRIM( (SELECT value FROM actor.org_unit_ancestor_setting('circ.reshelving_complete.interval', cp.circ_lib)),'"' ), ? )  AS INTERVAL)
 		  )
 	SQL
 	my $sth = action::circulation->db_Main->prepare_cached($sql);
-	$sth->execute($window, $window, $window);
+	$sth->execute($window);
 
 	return $sth->rows;
 

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list