Bug 20251

Summary: Regression - SIP checkout broken
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: SIP2Assignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: blocker    
Priority: P5 - low CC: colin.campbell, jonathan.druart, josef.moravec, katrin.fischer, m.de.rooy, mtj, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19280    
Bug Blocks:    
Attachments: Bug 20251: (bug 19280 follow-up) FIX SIP checkout
Patch with signoff
Bug 20251: (bug 19280 follow-up) FIX SIP checkout

Description Colin Campbell 2018-02-20 11:29:49 UTC
Attempts to checkout via sip cause the sipserver to crash.

The interface to CanBookBeIssued was altered so it now requires a Koha::Patron object. When passed an oldstyle Patron hash it aborts on the call to unblessed.

Can be mitigated by retrieving a Patron object with
Koha::Patrons->find( { cardnumber => $borrower->{cardnumber}} );

in _can_we_issue sub of Checkout.pm but it may be time to look at rationalizing the patron handling in the SIP routines
Comment 1 Jonathan Druart 2018-02-28 15:53:27 UTC
Caused by
  commit d8dc86bc4bde4b5744cd0bc954e1e5767250dde2
    Bug 19280: Pass a Koha::Patron to CanBookBeIssued
Comment 2 Jonathan Druart 2018-02-28 15:58:12 UTC
Created attachment 72291 [details] [review]
Bug 20251: (bug 19280 follow-up) FIX SIP checkout
Comment 3 Jonathan Druart 2018-02-28 15:59:21 UTC
Hi Colin, thanks for catching that!
Does this patch make sense to you?
Comment 4 Colin Campbell 2018-03-01 14:44:24 UTC
Created attachment 72308 [details] [review]
Patch with signoff
Comment 5 Colin Campbell 2018-03-01 14:45:39 UTC
(In reply to Jonathan Druart from comment #3)
> Hi Colin, thanks for catching that!
> Does this patch make sense to you?

Yes, I've  ran tests doing issues and related operations and responses are ok
Comment 6 Marcel de Rooy 2018-03-02 06:38:02 UTC
QA: Looking here now
Comment 7 Marcel de Rooy 2018-03-02 07:19:56 UTC
Created attachment 72343 [details] [review]
Bug 20251: (bug 19280 follow-up) FIX SIP checkout

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Nick Clemens 2018-03-15 09:23:30 UTC
Pushed to master for 18.05, thanks to all for your hard work.
Comment 9 Nick Clemens 2018-04-06 17:07:32 UTC
Dependency not in stable.