From e614c68d727a0d2bcabac80ffa0586dff8e364d0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 10 Mar 2022 13:53:17 +0000 Subject: [PATCH] Bug 29936: Add holds_get_captured option to sip config This patch adds a new option to the SIP config, allowing for hold capture to be disabled on difference devices. We still notice the hold and alert the user, but we do not trigger the update in the system to mark the hold as found (waiting, processing or in transit). Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Martin Renvoize Signed-off-by: Sally Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers --- C4/SIP/ILS/Transaction/Checkin.pm | 29 ++++++++++++++++------------- debian/templates/SIPconfig.xml | 1 + etc/SIPconfig.xml | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm index 24be0aff78..004aa05efa 100644 --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ b/C4/SIP/ILS/Transaction/Checkin.pm @@ -50,9 +50,10 @@ sub do_checkin { my $return_date = shift; my $account = shift; - my $checked_in_ok = $account->{checked_in_ok}; - my $cv_triggers_alert = $account->{cv_triggers_alert}; - my $holds_block_checkin = $account->{holds_block_checkin}; + my $checked_in_ok = $account->{checked_in_ok}; + my $cv_triggers_alert = $account->{cv_triggers_alert}; + my $holds_block_checkin = $account->{holds_block_checkin}; + my $holds_get_captured = $account->{holds_get_captured} // 1; if (!$branch) { $branch = 'SIP2'; @@ -148,20 +149,22 @@ sub do_checkin { } elsif ($branch eq $messages->{ResFound}->{branchcode}) { $self->hold($messages->{ResFound}); $self->alert_type('01'); - ModReserveAffect( $messages->{ResFound}->{itemnumber}, - $messages->{ResFound}->{borrowernumber}, 0, $messages->{ResFound}->{reserve_id}); + ModReserveAffect( + $messages->{ResFound}->{itemnumber}, + $messages->{ResFound}->{borrowernumber}, + 0, $messages->{ResFound}->{reserve_id} + ) if $holds_get_captured; } else { $self->hold($messages->{ResFound}); $self->alert_type('02'); - ModReserveAffect( $item->itemnumber, - $messages->{ResFound}->{borrowernumber}, 1, $messages->{ResFound}->{reserve_id}); - ModItemTransfer( $item->itemnumber, - $branch, - $messages->{ResFound}->{branchcode}, - 'Reserve', - ); - + if ($holds_get_captured) { + ModReserveAffect( $item->itemnumber, + $messages->{ResFound}->{borrowernumber}, + 1, $messages->{ResFound}->{reserve_id} ); + ModItemTransfer( $item->itemnumber, $branch, + $messages->{ResFound}->{branchcode}, 'Reserve', ); + } } $self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); $self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); diff --git a/debian/templates/SIPconfig.xml b/debian/templates/SIPconfig.xml index 15c8d8d067..ac5a01110c 100644 --- a/debian/templates/SIPconfig.xml +++ b/debian/templates/SIPconfig.xml @@ -53,6 +53,7 @@ send_patron_home_library_in_af="1" av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" holds_block_checkin="0" + holds_get_captured="1" overdues_block_checkout="1" format_due_date="0" inhouse_patron_categories=""> diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml index d91f72bf1a..e273cfc25b 100644 --- a/etc/SIPconfig.xml +++ b/etc/SIPconfig.xml @@ -70,6 +70,7 @@ hide_fields="BD,BE,BF,PB" register_id='' holds_block_checkin="0" + holds_get_captured="1" prevcheckout_block_checkout="0" overdues_block_checkout="1" format_due_date="0" -- 2.39.5