Bug 27014: Enable C4::SIP::ILS::Patron::new to accept a hash
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Nov 2020 13:24:43 +0000 (08:24 -0500)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Feb 2021 12:12:56 +0000 (13:12 +0100)
commit05e16389efa6e66476484ee12c3a5c5fdd48757b
treef59a5fce0ed037fa648a4e049bcf2a680ac2d83c
parent506b8f125b7c7dda1dc70b4963026ea975a8c655
Bug 27014: Enable C4::SIP::ILS::Patron::new to accept a hash

Caused by bug 23403 - when performing a checkin we lookup the SIP patron
using the borrowernumber, however, SIP only knows how to find a patron
via cardnumber or userid

The change on 23403 was to avoid using an 'id' that didn't always exist
(as some users don't have a userid or cardnumber

When checking in, however, we are not passed a user cardnumber or
borrowernumber, so we don't have those on hand to get the patron.

Test Plan:
1) Check in an item via SIP, note patron is not found
2) Apply this patch
3) Restart all the things!
4) Check in an item via SIP, patron should be found!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/ILS.pm
C4/SIP/ILS/Patron.pm