The SCO tool breaks when a non-existent barcode is introduced To reproduce: - Log into SCO - Type any barcode that doesn't exist on the DB, hit enter => FAIL: Explodes
Created attachment 87672 [details] [review] Bug 22675: Fix SCO behaviour on non-existent barcodes Bug 21206 replaced GetItem for Koha::Items->find, and introduced this problem. This patch verifies $item is defined before attempting to use its methods. To test: - Log into SCO - Type an invalid barcode => FAIL: Things explode :-/ - Apply this patch, reload - Type an invalid barcode => SUCCESS: A nice error message is displayed :-D - Sign off :-D
Created attachment 87684 [details] [review] Bug 22675: Fix SCO behaviour on non-existent barcodes Bug 21206 replaced GetItem for Koha::Items->find, and introduced this problem. This patch verifies $item is defined before attempting to use its methods. To test: - Log into SCO - Type an invalid barcode => FAIL: Things explode :-/ - Apply this patch, reload - Type an invalid barcode => SUCCESS: A nice error message is displayed :-D - Sign off :-D Signed-off-by: Liz Rea <wizzyrea@gmail.com> 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent. 100% that used to explode, and now does not. Excellent.
Created attachment 87685 [details] [review] Bug 22675: Fix SCO behaviour on non-existent barcodes Bug 21206 replaced GetItem for Koha::Items->find, and introduced this problem. This patch verifies $item is defined before attempting to use its methods. To test: - Log into SCO - Type an invalid barcode => FAIL: Things explode :-/ - Apply this patch, reload - Type an invalid barcode => SUCCESS: A nice error message is displayed :-D - Sign off :-D Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I laughed so hard at myself I scared my dog.
Created attachment 87702 [details] [review] Bug 22675: Fix SCO behaviour on non-existent barcodes Bug 21206 replaced GetItem for Koha::Items->find, and introduced this problem. This patch verifies $item is defined before attempting to use its methods. To test: - Log into SCO - Type an invalid barcode => FAIL: Things explode :-/ - Apply this patch, reload - Type an invalid barcode => SUCCESS: A nice error message is displayed :-D - Sign off :-D Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 19.05
Bug in enhancement not in 18.11.x series