When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn : Use of uninitialized value in say at /home/koha/src/misc/export_records.pl Also exporting barcode if empty string makes no sense.
Created attachment 107947 [details] [review] Bug 26175: Remove warn if undefined barcode in misc/export_records.pl When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn : Use of uninitialized value in say at /home/koha/src/misc/export_records.pl Also exporting barcode if empty string makes no sense. Test plan : 1) Delete an item with barcode = NULL 2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes 3) Check you se no warn "Use of uninitialized value in say ..." 4) Delete an item with barcode = '' 5) Run 2) 6) Check there is no empty line in /tmp/deleted_barcodes
Created attachment 108054 [details] [review] Bug 26175: Remove warn if undefined barcode in misc/export_records.pl When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn : Use of uninitialized value in say at /home/koha/src/misc/export_records.pl Also exporting barcode if empty string makes no sense. Test plan : 1) Delete an item with barcode = NULL 2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes 3) Check you se no warn "Use of uninitialized value in say ..." 4) Delete an item with barcode = '' 5) Run 2) 6) Check there is no empty line in /tmp/deleted_barcodes Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 108190 [details] [review] Bug 26175: Remove warn if undefined barcode in misc/export_records.pl When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn : Use of uninitialized value in say at /home/koha/src/misc/export_records.pl Also exporting barcode if empty string makes no sense. Test plan : 1) Delete an item with barcode = NULL 2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes 3) Check you se no warn "Use of uninitialized value in say ..." 4) Delete an item with barcode = '' 5) Run 2) 6) Check there is no empty line in /tmp/deleted_barcodes Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Logically makes sense and works as expected.. Passing QA
How is this --deleted_barcodes flag used? I don't understand why it is in this script. Why don't we display an empty line instead? Imagine someone using it to know the number of deleted records (wc -l).
waiting for an answer.
(In reply to Jonathan Druart from comment #5) > How is this --deleted_barcodes flag used? > > I don't understand why it is in this script. > > Why don't we display an empty line instead? > Imagine someone using it to know the number of deleted records (wc -l). Hi, It is used to update a portal : After exporting modified/created records, we exported a list of deleted barcodes to remove items from the portal (they may not be in a modified record). Barcode is enough because other datas are fetched live via ILS-DI. An empty line does not mean anything I think.
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.04
enhancement, not backported to 19.11.x
Created attachment 111730 [details] [review] Bug 26175: (QA follow-up) Add tests for previous cashups