C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode });
Created attachment 77586 [details] [review] Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode }); We should make sure the barcode existed in DB and so that ->find returns an object. Note that most of the time we just wanted to know if the barcode existed. The changes are very simple, the only one that need attention is the one in batchMod.pl. It is basically reusing what we did on bug 21141. Test plan: Use the batch item modification/deletion tools to modify/delete items from their barcode (using the textarea or a file)
Created attachment 77587 [details] [review] Bug 21183: Remove GetItemnumberFromBarcode Test plan: git grep GetItemnumberFromBarcode should not return anything
Created attachment 77687 [details] [review] Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode }); We should make sure the barcode existed in DB and so that ->find returns an object. Note that most of the time we just wanted to know if the barcode existed. The changes are very simple, the only one that need attention is the one in batchMod.pl. It is basically reusing what we did on bug 21141. Test plan: Use the batch item modification/deletion tools to modify/delete items from their barcode (using the textarea or a file)
After submitting some barcodes in tools -> item batch modification: Can't locate object method "get_column" via package "0" (perhaps you forgot to load "0"?) at /home/vagrant/kohaclone/tools/batchMod.pl line 268.
Created attachment 77930 [details] [review] Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode }); We should make sure the barcode existed in DB and so that ->find returns an object. Note that most of the time we just wanted to know if the barcode existed. The changes are very simple, the only one that need attention is the one in batchMod.pl. It is basically reusing what we did on bug 21141. Test plan: Use the batch item modification/deletion tools to modify/delete items from their barcode (using the textarea or a file)
Sorry, but still not working: Can't use string ("2") as an ARRAY ref while "strict refs" in use at /home/vagrant/kohaclone/tools/batchMod.pl line 269
Created attachment 77933 [details] [review] Bug 21183: Fix ->get_column call context I am not sure to understand what's going on here.
Hum, weird...
Created attachment 77936 [details] [review] Bug 21183: Remove GetItemnumberFromBarcode Test plan: git grep GetItemnumberFromBarcode should not return anything Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 77937 [details] [review] Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode }); We should make sure the barcode existed in DB and so that ->find returns an object. Note that most of the time we just wanted to know if the barcode existed. The changes are very simple, the only one that need attention is the one in batchMod.pl. It is basically reusing what we did on bug 21141. Test plan: Use the batch item modification/deletion tools to modify/delete items from their barcode (using the textarea or a file) Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 77938 [details] [review] Bug 21183: Fix ->get_column call context I am not sure to understand what's going on here. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 78056 [details] [review] Bug 21183: Remove GetItemnumberFromBarcode Test plan: git grep GetItemnumberFromBarcode should not return anything Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 78057 [details] [review] Bug 21183: Replace C4::Items::GetItemnumberFromBarcode calls C4::Items::GetItemnumberFromBarcode calls can be replaced with Koha::Items->find({ barcode => $barcode }); We should make sure the barcode existed in DB and so that ->find returns an object. Note that most of the time we just wanted to know if the barcode existed. The changes are very simple, the only one that need attention is the one in batchMod.pl. It is basically reusing what we did on bug 21141. Test plan: Use the batch item modification/deletion tools to modify/delete items from their barcode (using the textarea or a file) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 78058 [details] [review] Bug 21183: Fix ->get_column call context I am not sure to understand what's going on here. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 18.11
Refactoring enhancement, will not be backported to 18.05.x series.