From 8d2f40b89548478041c086fd7982051c160a5c85 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 13 Sep 2014 11:40:41 -0400 Subject: [PATCH 1/1] Add use_force_holds config option for NCIP::ILS::Evergreen. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS/Evergreen.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index 35d8e88..996b737 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -1121,7 +1121,11 @@ sub create_fuller_copy { $item->call_number($acn->id()); $item->circ_lib($self->{session}->{work_ou}->id); $item->circulate('t'); - $item->holdable('t'); + if ($self->{config}->{items}->{use_force_holds}) { + $item->holdable('f'); + } else { + $item->holdable('t'); + } $item->opac_visible('f'); $item->deleted('f'); $item->fine_level(OILS_PRECAT_COPY_FINE_LEVEL); @@ -1230,9 +1234,10 @@ sub place_hold { $params = { pickup_lib => $location->id(), patronid => $user->id() }; if (ref($item) eq 'Fieldmapper::asset::copy') { - $hold->hold_type('C'); + my $type = ($self->{config}->{items}->{use_force_holds}) ? 'F' : 'C'; + $hold->hold_type($type); $hold->current_copy($item->id()); - $params->{hold_type} = 'C'; + $params->{hold_type} = $type; $params->{copy_id} = $item->id(); } elsif (ref($item) eq 'Fieldmapper::asset::call_number') { $hold->hold_type('V'); -- 2.43.2