Bugzilla – Attachment 104763 Details for
Bug 23403
SIP2 lends to wrong patron if cardnumber is missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23403: Catch other cases of ->{patron}
Bug-23403-Catch-other-cases-of--patron.patch (text/plain), 2.65 KB, created by
Nick Clemens (kidclamp)
on 2020-05-12 11:52:38 UTC
(
hide
)
Description:
Bug 23403: Catch other cases of ->{patron}
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-05-12 11:52:38 UTC
Size:
2.65 KB
patch
obsolete
>From 9913150457c5dc8802ac3a5fbe9608ef258bb5d5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 13 Apr 2020 15:51:36 +0000 >Subject: [PATCH] Bug 23403: Catch other cases of ->{patron} > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/SIP/ILS.pm | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 75d4b2b958..fde12ad270 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -147,8 +147,8 @@ sub checkout { > elsif ( !$item ) { > $circ->screen_msg("Invalid Item"); > } >- elsif ( $item->{patron} >- && !_ci_cardnumber_cmp( $item->{patron}, $patron_id ) ) >+ elsif ( $item->{borrowernumber} >+ && !_ci_cardnumber_cmp( $item->{borrowernumber}, $patron_id ) ) > { > $circ->screen_msg("Item checked out to another patron"); > } >@@ -159,10 +159,10 @@ sub checkout { > > # If the item is already associated with this patron, then > # we're renewing it. >- $circ->renew_ok( $item->{patron} >- && _ci_cardnumber_cmp( $item->{patron}, $patron_id ) ); >+ $circ->renew_ok( $item->{borrowernumber} >+ && _ci_cardnumber_cmp( $item->{borrowernumber}, $patron_id ) ); > >- $item->{patron} = $patron_id; >+ $item->{borrowernumber} = $patron_id; > $item->{due_date} = $circ->{due}; > push( @{ $patron->{items} }, { barcode => $item_id } ); > $circ->desensitize( !$item->magnetic_media ); >@@ -226,7 +226,7 @@ sub checkin { > } elsif ( $data->{messages}->{WasLost} && !$circ->ok && C4::Context->preference("BlockReturnOfLostItems") ) { > $circ->screen_msg("Item lost, return not allowed"); > syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item lost"); >- } elsif ( !$item->{patron} ) { >+ } elsif ( !$item->{borrowernumber} ) { > if ( $checked_in_ok ) { # Mark checkin ok although book not checked out > $circ->ok( 1 ); > syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok"); >@@ -235,8 +235,8 @@ sub checkin { > syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item not checked out"); > } > } elsif ( $circ->ok ) { >- $circ->patron( $patron = C4::SIP::ILS::Patron->new( $item->{patron} ) ); >- delete $item->{patron}; >+ $circ->patron( $patron = C4::SIP::ILS::Patron->new( $item->{borrowernumber} ) ); >+ delete $item->{borrowernumber}; > delete $item->{due_date}; > $patron->{items} = [ grep { $_ ne $item_id } @{ $patron->{items} } ]; > } else { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23403
:
95703
|
96404
|
101303
|
101304
|
101445
|
101456
|
102859
|
104313
|
104314
|
104315
|
104316
|
104760
|
104761
|
104762
| 104763