Browse Source

Bug 25761: Implementation of too_many_overdue has unintended consequences

Bug 24449 implemented the too_many_overdue SIP flag ( position 6 of the
patron status flags ). This has had unintended consequences as
many library use SIP2 for validation to eresource vendors ( Overdrive,
Hoopla, etc ), but do not want overdue checkouts to block the
use of these resources.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Find a patron with overdue items
4) Run a SIP2 patron information request
5) Note the "too many overdue" flag is set
6) Set the new SIP config option "disable_too_many_overdue" for the
account you used for testing
7) Restart the SIP server
8) Run the same patron information request
9) Notice the "too many overdue" flag is no longer set!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Kyle Hall 2 years ago
committed by Jonathan Druart
parent
commit
f6323ee535
  1. 10
      C4/SIP/Sip/MsgType.pm
  2. 1
      etc/SIPconfig.xml

10
C4/SIP/Sip/MsgType.pm

@ -433,7 +433,7 @@ sub build_patron_status {
$password_rc = $patron->check_password($patron_pwd);
}
$resp .= patron_status_string($patron);
$resp .= patron_status_string( $patron, $server );
$resp .= $lang . timestamp();
if ( defined $server->{account}->{ae_field_template} ) {
$resp .= add_field( FID_PERSONAL_NAME, $patron->format( $server->{account}->{ae_field_template}, $server ) );
@ -969,7 +969,7 @@ sub handle_patron_info {
$resp = (PATRON_INFO_RESP);
if ($patron) {
$patron->update_lastseen();
$resp .= patron_status_string($patron);
$resp .= patron_status_string( $patron, $server );
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language;
$resp .= timestamp();
@ -1337,7 +1337,7 @@ sub handle_patron_enable {
# Don't enable the patron if there was an invalid password
$status = $patron->enable;
}
$resp .= patron_status_string($patron);
$resp .= patron_status_string( $patron, $server );
$resp .= $patron->language . timestamp();
$resp .= add_field( FID_PATRON_ID, $patron->id, $server );
@ -1663,6 +1663,8 @@ sub send_acs_status {
#
sub patron_status_string {
my $patron = shift;
my $server = shift;
my $patron_status;
siplog( "LOG_DEBUG", "patron_status_string: %s charge_ok: %s", $patron->id, $patron->charge_ok );
@ -1674,7 +1676,7 @@ sub patron_status_string {
denied( $patron->hold_ok ),
boolspace( $patron->card_lost ),
boolspace( $patron->too_many_charged ),
boolspace( $patron->too_many_overdue ),
$server->{account}->{disable_too_many_overdue} ? q{ } : boolspace( $patron->too_many_overdue ),
boolspace( $patron->too_many_renewal ),
boolspace( $patron->too_many_claim_return ),
boolspace( $patron->too_many_lost ),

1
etc/SIPconfig.xml

@ -60,6 +60,7 @@
da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]"
av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
hide_fields="BD,BE,BF,PB"
disable_too_many_overdue="1"
register_id=''
holds_block_checkin="0">
<screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />

Loading…
Cancel
Save