Ensure "Reshelved" copies are still reshelving
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 15 Oct 2014 15:32:58 +0000 (11:32 -0400)
committerJason Boyer <jboyer@equinoxinitiative.org>
Mon, 9 Sep 2019 20:07:02 +0000 (16:07 -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 4a49804..f987d3b 100644 (file)
@@ -226,6 +226,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);