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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2022-03-10 13:53:17 +00:00 committed by Fridolin Somers
parent 9032c41575
commit e614c68d72
3 changed files with 18 additions and 13 deletions

View File

@ -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} );

View File

@ -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="">

View File

@ -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"