Ensure "Reshelved" copies are still reshelving user/tsbere/lp1018011
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 15 Oct 2014 15:32:58 +0000 (11:32 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Wed, 15 Oct 2014 15:32:58 +0000 (11:32 -0400)
Rather than "were reshelving when the query started"

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 0452676..42317fa 100644 (file)
@@ -206,6 +206,7 @@ sub complete_reshelving {
             WHERE cp.status = 7
                 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)
           )
+          AND status = 7
     SQL
     my $sth = action::circulation->db_Main->prepare_cached($sql);
     $sth->execute($window);