From 30d566752d6dc4285c0e69ca07e8c5ba2ad26190 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 21 Aug 2006 20:48:32 +0000 Subject: [PATCH] adding initial closed date support to the targeter git-svn-id: svn://svn.open-ils.org/ILS/trunk@5630 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/action.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 c399c67f13..4e9e89e9ad 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -718,9 +718,20 @@ sub new_hold_copy_targeter { $client->status( new OpenSRF::DomainObject::oilsContinueStatus ); + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); + $year += 1900; + $mon += 1; + my $today= sprintf( '%s-%0.2d-%0.2d', $year, $mon, $mday ); + + my @closed = actor::org_unit::closed_date->search( + { close_start => { '<=', $today }, + close_end => { '>=', $today } } + ); + my @good_copies; for my $c (@$all_copies) { next if ($c->id == $hold->current_copy); + next if ( grep { ''.$_->org_unit == ''.$c->circ_lib } @closed ); next if (action::hold_request ->search_where( { current_copy => $c->id, -- 2.43.2