Summary: | Remove warn if undefined barcode in misc/export_records.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Command-line Utilities | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, jonathan.druart, lucas, martin.renvoize, robin |
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: |
20.11.00, 20.05.04
|
|
Circulation function: | |||
Bug Depends on: | 16935 | ||
Bug Blocks: | |||
Attachments: |
Bug 26175: Remove warn if undefined barcode in misc/export_records.pl
Bug 26175: Remove warn if undefined barcode in misc/export_records.pl Bug 26175: Remove warn if undefined barcode in misc/export_records.pl Bug 26175: (QA follow-up) Add tests for previous cashups |
Description
Fridolin Somers
2020-08-07 08:58:09 UTC
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 |