From bugzilla-daemon@bugs.koha-community.org Tue Jul 3 23:22:20 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] New: runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Tue, 03 Jul 2018 21:21:49 +0000
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6781968555687793937=="
--===============6781968555687793937==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Bug ID: 21035
Summary: runreport.pl prints only a newline when printing a row
that has a field that contains an embedded newline.
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: koha-bugs@lists.koha-community.org
Reporter: barton@bywatersolutions.com
QA Contact: testopia@bugs.koha-community.org
CC: robin@catalyst.net.nz
when runrepurt.pl is run using the --format=csv or --format=tsv options, any
fields which contain embedded newlines will cause the row of results to be
blank, displaying only a newline.
To replicate:
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 10:
$ perl ./misc/cronjobs/runreport.pl --format=csv 9
456,"Public note has one and only one line."
The same results hold when using --format=tsv
When using --format=html, both rows are displayed:
$ perl ./misc/cronjobs/runreport.pl --format=html 10
| 123 | Line1
Line2 |
| 456 | Public note has one and only one line. |
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============6781968555687793937==--
From bugzilla-daemon@bugs.koha-community.org Tue Jul 3 23:31:14 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Tue, 03 Jul 2018 21:31:11 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9197541020303839453=="
--===============9197541020303839453==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Barton Chittenden changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |minor
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============9197541020303839453==--
From bugzilla-daemon@bugs.koha-community.org Wed Jul 4 20:07:09 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Wed, 04 Jul 2018 18:07:06 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2556476423497356440=="
--===============2556476423497356440==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Jonathan Druart changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |Needs Signoff
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============2556476423497356440==--
From bugzilla-daemon@bugs.koha-community.org Wed Jul 4 20:07:13 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Wed, 04 Jul 2018 18:07:10 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2678581576340140797=="
--===============2678581576340140797==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D21035
--- Comment #1 from Jonathan Druart =
---
Created attachment 76698
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D76698&action=3D=
edit
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=3Dcsv REPORT_ID:
=3D> You should see both lines
--=20
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============2678581576340140797==--
From bugzilla-daemon@bugs.koha-community.org Wed Jul 4 20:07:24 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Wed, 04 Jul 2018 18:07:18 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8816379761589879586=="
--===============8816379761589879586==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Jonathan Druart changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jonathan.druart@bugs.koha-c
| |ommunity.org
Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c
|ity.org |ommunity.org
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
--===============8816379761589879586==--
From bugzilla-daemon@bugs.koha-community.org Fri Jul 13 21:44:47 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Fri, 13 Jul 2018 19:44:44 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6970096154001265013=="
--===============6970096154001265013==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Maryse Simard changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #76698|0 |1
is obsolete| |
--- Comment #2 from Maryse Simard ---
Created attachment 76964
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76964&action=edit
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
Followed the test plan and it works.
--
You are receiving this mail because:
You are watching all bug changes.
--===============6970096154001265013==--
From bugzilla-daemon@bugs.koha-community.org Fri Jul 13 21:45:12 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Fri, 13 Jul 2018 19:44:42 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0363736319436096939=="
--===============0363736319436096939==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Maryse Simard changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |Signed Off
--
You are receiving this mail because:
You are watching all bug changes.
--===============0363736319436096939==--
From bugzilla-daemon@bugs.koha-community.org Thu Aug 2 13:36:27 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Thu, 02 Aug 2018 11:36:24 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5921396234950612897=="
--===============5921396234950612897==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Katrin Fischer changed:
What |Removed |Added
----------------------------------------------------------------------------
Patch complexity|--- |Trivial patch
Status|Signed Off |Passed QA
--
You are receiving this mail because:
You are watching all bug changes.
--===============5921396234950612897==--
From bugzilla-daemon@bugs.koha-community.org Thu Aug 2 13:36:33 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Thu, 02 Aug 2018 11:36:28 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5451219974349183473=="
--===============5451219974349183473==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Katrin Fischer changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #76964|0 |1
is obsolete| |
--- Comment #3 from Katrin Fischer ---
Created attachment 77425
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77425&action=edit
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
Followed the test plan and it works.
Signed-off-by: Katrin Fischer
--
You are receiving this mail because:
You are watching all bug changes.
--===============5451219974349183473==--
From bugzilla-daemon@bugs.koha-community.org Thu Aug 2 13:36:53 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline.
Date: Thu, 02 Aug 2018 11:36:50 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6256159441863318375=="
--===============6256159441863318375==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Katrin Fischer changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |katrin.fischer@bsz-bw.de
--
You are receiving this mail because:
You are watching all bug changes.
--===============6256159441863318375==--
From bugzilla-daemon@bugs.koha-community.org Thu Aug 2 13:37:19 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline
Date: Thu, 02 Aug 2018 11:37:16 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9073705667605489219=="
--===============9073705667605489219==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Katrin Fischer changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|runreport.pl prints only a |runreport.pl prints only a
|newline when printing a row |newline when printing a row
|that has a field that |that has a field that
|contains an embedded |contains an embedded
|newline. |newline
--
You are receiving this mail because:
You are watching all bug changes.
--===============9073705667605489219==--
From bugzilla-daemon@bugs.koha-community.org Thu Aug 9 14:25:53 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline
Date: Thu, 09 Aug 2018 12:25:47 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1239283086832111965=="
--===============1239283086832111965==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Nick Clemens changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Passed QA |Pushed to Master
CC| |nick@bywatersolutions.com
--- Comment #4 from Nick Clemens ---
Awesome work all!
Pushed to master for 18.11
--
You are receiving this mail because:
You are watching all bug changes.
--===============1239283086832111965==--
From bugzilla-daemon@bugs.koha-community.org Fri Aug 10 09:48:15 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline
Date: Fri, 10 Aug 2018 07:48:12 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4556719063404521449=="
--===============4556719063404521449==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Martin Renvoize changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |martin.renvoize@ptfs-europe
| |.com
Status|Pushed to Master |Pushed to Stable
--- Comment #5 from Martin Renvoize ---
Pushed to 18.05.x for 18.05.03
--
You are receiving this mail because:
You are watching all bug changes.
--===============4556719063404521449==--
From bugzilla-daemon@bugs.koha-community.org Fri Sep 21 14:11:20 2018
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 21035] runreport.pl prints only a newline when
printing a row that has a field that contains an embedded newline
Date: Fri, 21 Sep 2018 12:11:17 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7641377730943362829=="
--===============7641377730943362829==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21035
Fridolin SOMERS changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fridolin.somers@biblibre.co
| |m
Status|Pushed to Stable |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Fridolin SOMERS ---
Pushed to 17.11.x for 17.11.10
--
You are receiving this mail because:
You are watching all bug changes.
--===============7641377730943362829==--