Bug 21035: Handle new lines when running reports
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Jul 2018 18:05:25 +0000 (15:05 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 10 Aug 2018 07:47:53 +0000 (08:47 +0100)
commit4fd18a7df711f5a59f459234ec186b175ee05eb6
tree4993a72ce80c1041fa191125f9c3c932529e608f
parent1dfa4318262a908b1df9d8d2454c15a39c84416c
Bug 21035: Handle new lines when running reports

See https://metacpan.org/pod/Text::CSV_XS#Embedded-newlines

Test plan:

1) Choose two items, say barcode '123' and '456'
2) Change the public note on 123 to read

Line1
Line2

(I.e. type 'Line1', then press Enter, type 'Line2' and click update).
3) Change the public note on 456 to read

Public note has one and only one line.

Click update.
4) Create a report with the followng query:

select barcode, itemnotes from items where barcode in ( '123', '456' )

Let's say that this is report number 10.

5) run ./misc/cronjobs/runreport.pl --format=csv REPORT_ID:

=> You should see both lines

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f16fb888f132703063f0591e329d72d065f4b1d9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/runreport.pl