Bug 21168

Summary: Error on circ/returns.pl after deleting checked-in item
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 18276    
Bug Blocks:    
Attachments: Bug 21168: Handle deleted checked-in items on checking in
Bug 21168: Handle deleted checked-in items on checking in
Bug 21168: Handle deleted checked-in items on checking in

Description Andrew Fuerste-Henry 2018-08-07 15:30:30 UTC
circ/returns.pl generates a server error when attempting to checkin an item while the list of previously-returned items contains an item that has been deleted. Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

To test:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
- error appears

item2 will have been successfully returned, despite the error, but no confirmation of this is given.
Comment 1 Jonathan Druart 2018-08-10 20:05:25 UTC
Created attachment 77715 [details] [review]
Bug 21168: Handle deleted checked-in items on checking in

circ/returns.pl generates a server error when attempting to checkin an item while
the list of previously-returned items contains an item that has been deleted.
Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

Test plan:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
=> No error appears
Comment 2 Jonathan Druart 2018-08-10 20:06:36 UTC
Caused by:
  commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299
  Bug 18276: Remove GetBiblioFromItemNumber - Easy ones
Comment 3 Tomás Cohen Arazi (tcohen) 2018-08-24 17:36:32 UTC
Created attachment 78146 [details] [review]
Bug 21168: Handle deleted checked-in items on checking in

circ/returns.pl generates a server error when attempting to checkin an item while
the list of previously-returned items contains an item that has been deleted.
Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

Test plan:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
=> No error appears

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Katrin Fischer 2018-08-26 16:27:15 UTC
Created attachment 78172 [details] [review]
Bug 21168: Handle deleted checked-in items on checking in

circ/returns.pl generates a server error when attempting to checkin an item while
the list of previously-returned items contains an item that has been deleted.
Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

Test plan:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
=> No error appears

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Katrin Fischer 2018-08-27 12:43:36 UTC
Sorry, forgot the sign-off line. RM, would you make an exception and add it before push?
Comment 6 Nick Clemens (kidclamp) 2018-08-30 14:11:48 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize (ashimema) 2018-09-05 09:42:44 UTC
Pushed to 18.05.x for 18.05.04
Comment 8 Fridolin Somers 2018-09-24 07:05:34 UTC
Pushed to 17.11.x for 17.11.10