Bug 17095

Summary: Regression: Error when checking out to non-existent patron
Product: Koha Reporter: Owen Leonard <oleonard>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, kyle
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/circ/circulation.pl?borrowernumber=X
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17095: (bug 16849 follow-up) Fix regression if patron does not exist
[SIGNED-OFF] Bug 17095: (bug 16849 follow-up) Fix regression if patron does not exist
Bug 17095: (bug 16849 follow-up) Fix regression if patron does not exist

Description Owen Leonard 2016-08-09 18:47:03 UTC
Bug 16082, 'Display a friendly "patron does not exist" message if that's the case - circulation.pl' changed the behavior of the checkout page so that if you hit that page with a borrowernumber which doesn't exist a nice message will tell you so.

Now when you do that you get an error message:

Can't call method "is_debarred" on an undefined value at /circ/circulation.pl line 300.

git bisect blames Bug 16849, 'Move IsDebarred to Koha::Patron->is_debarred'
Comment 1 Jonathan Druart 2016-08-09 19:10:58 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-08-10 12:35:44 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2016-08-12 17:47:25 UTC
Created attachment 54391 [details] [review]
Bug 17095: (bug 16849 follow-up) Fix regression if patron does not exist

Bug 16082, 'Display a friendly "patron does not exist" message if that's the
case - circulation.pl' changed the behavior of the checkout page so that if
you hit that page with a borrowernumber which doesn't exist a nice message will
tell you so.

Now when you do that you get an error message:
  Can't call method "is_debarred" on an undefined value at /circ/circulation.pl line 300.

Test plan:
confirm that the friendly message is back :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Kyle M Hall 2016-08-18 16:04:07 UTC
Pushed to master for 16.11, thanks Jonathan!