Bug 25605

Summary: Exporting report as a tab delimited file can produce a lot of warnings
Product: Koha Reporter: Didier Gautheron <didier.gautheron>
Component: ReportsAssignee: Didier Gautheron <didier.gautheron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, black23, lucas, marco.abi-ramia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.04
Attachments: Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text

Description Didier Gautheron 2020-05-26 11:24:37 UTC
tabulation export uses a plain join function, but if there's null values you get zillion:

Use of uninitialized value in join or string at /kohadevbox/koha/reports/guided_reports.pl line 904.

in /var/log/koha/kohadev/plack-error.log
Comment 1 Didier Gautheron 2020-05-26 11:45:11 UTC
Created attachment 105357 [details] [review]
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text

Test plan :
    1- Create a new report : select * from items;
    2- Run it
    3- Download the report as a tab separated text
    4- There's a lot of 'use of uninitialized value in join or string at ...koha/reports/guided_reports.pl line xxx.'
    in plack-error.log
    5- Apply patch
    6- Restart all
    7- Redo 2 and 3
    8- No more warning.
    9- diff both downloaded files, they must be the same.
Comment 2 Marco Abi-Ramia 2020-08-18 14:04:05 UTC
Created attachment 108509 [details] [review]
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text

Test plan :
    1- Create a new report : select * from items;
    2- Run it
    3- Download the report as a tab separated text
    4- There's a lot of 'use of uninitialized value in join or string at ...koha/reports/guided_reports.pl line xxx.'
    in plack-error.log
    5- Apply patch
    6- Restart all
    7- Redo 2 and 3
    8- No more warning.
    9- diff both downloaded files, they must be the same.

Signed-off-by: Marco Abi-Ramia <marco.abi-ramia@inlibro.com>
Comment 3 Katrin Fischer 2020-08-18 21:39:17 UTC
Created attachment 108561 [details] [review]
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text

Test plan :
    1- Create a new report : select * from items;
    2- Run it
    3- Download the report as a tab separated text
    4- There's a lot of 'use of uninitialized value in join or string at ...koha/reports/guided_reports.pl line xxx.'
    in plack-error.log
    5- Apply patch
    6- Restart all
    7- Redo 2 and 3
    8- No more warning.
    9- diff both downloaded files, they must be the same.

Signed-off-by: Marco Abi-Ramia <marco.abi-ramia@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2020-08-19 07:36:17 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-09-04 16:09:20 UTC
backported to 20.05.x for 20.05.04
Comment 6 Lucas Gass 2020-09-04 16:33:05 UTC
backported to 20.05.x for 20.05.04
Comment 7 Aleisha Amohia 2020-09-10 03:50:08 UTC
enhancement, not backported to 19.11.x