[Bug 27164] New: Double quotes everywhere in item search CSV export
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Bug ID: 27164 Summary: Double quotes everywhere in item search CSV export Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114233&action=edit Bug 27164: Double quotes everywhere in item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. This may help to open the CSV with any table/calc software. Test plan : 1.0) Without patch 1.1) Perform an item search 1.2) Export as a CSV file and save the file locally 1.3) Open the file with a table/calc software 2.0) Apply patch 2.1) Perform same item search 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Compare files with diff/meld => you see only double quotes arround header cells and removal of space after coma 3.1) In table/calc software they should look the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Oh there are more problems -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114261&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see only double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114233|0 |1 is obsolete| | Attachment #114261|0 |1 is obsolete| | --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114262&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see only double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Double quotes everywhere in |Fix item search CSV export |item search CSV export | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 114268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114268&action=edit item search export I'm still getting double quotes around everything in my export. The delimiter changed, though! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #6 from Didier Gautheron <didier.gautheron@biblibre.com> --- *** Bug 14169 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- You have : "Laurel & ""Hardy""";"";"";"";"q35y";"";"Centerville";... What is wrong ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- delimiter was hardcoded "," now its from system preference named "delimiter". Looks like you have ";" in this preference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Thanks a lot for testing BTW :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> ---
4.0) Compare files with diff/meld => you see only double quotes arround header cells and removal of space after coma
I thought from your test plan that I should not have double quotes around each data field after the patch. I was expecting: "Title";"Publication date";"Publisher"; ... Laurel & "Hardy";;;... Did I just misunderstand the plan? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Maura Stephens <maura.stephens@gmit.ie> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maura.stephens@gmit.ie -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114262|0 |1 is obsolete| | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114315&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- My bad ;) Test plan fixed : 4.0) Compare files with diff/meld => you see double quotes arround header cells -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114315|0 |1 is obsolete| | --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 114687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114687&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Thanks for clarifying! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | Patch complexity|Trivial patch |Small patch CC| |victor@tuxayo.net --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Hi :) Much needed improvements and I get better results by default on LibreOffice. The only issue found is about removing the space between title and author. Here is an example: "Laurel & ""Hardy""Hammarberg, Marcus." without quotes to Hardy, I would get "Laurel & HardyHammarberg, Marcus." Other examples 'More fruitful than the soil' :Mackillop, Andrew. "A Hegel dictionary /Inwood, Michael," "A tribute to Jack JohnsonDavis, Miles," The table HTML view and the detail page of the record insert a space between title and author. So it seems pretty sure we need to have that here. Which also means the "by" in UNIMARC case don't need a space before and after, otherwise the space will be duplicated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114687|0 |1 is obsolete| | --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 114776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114776&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Victor Grousset/tuxayo from comment #15)
Hi :)
Much needed improvements and I get better results by default on LibreOffice.
The only issue found is about removing the space between title and author.
Here is an example: "Laurel & ""Hardy""Hammarberg, Marcus." without quotes to Hardy, I would get "Laurel & HardyHammarberg, Marcus."
Other examples
'More fruitful than the soil' :Mackillop, Andrew. "A Hegel dictionary /Inwood, Michael," "A tribute to Jack JohnsonDavis, Miles,"
The table HTML view and the detail page of the record insert a space between title and author. So it seems pretty sure we need to have that here. Which also means the "by" in UNIMARC case don't need a space before and after, otherwise the space will be duplicated.
Good catch, I see it in my patch indeed. Trival change so I changed the main patch and went to "Signed Off" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114776|0 |1 is obsolete| | --- Comment #18 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114934&action=edit Bug 27164: Fix item search CSV export In item search CSV export, data cells are exported with double quotes. There should also be double quotes in header cells. Also some spaces can be removed. Delimiter must be from system preference 'delimiter'. TT filter must be $raw not html, only double quotes must be espaped by duplication of it. This may help to open the CSV with any table/calc software. Test plan : 1.0) Create a record with title : Laurel & "Hardy" 1.2) Create an item on this record 2.0) Without patch 2.1) Perform an item search on title 'Laurel' 2.2) Export as a CSV file and save the file locally 2.3) Open the file with a table/calc software 3.0) Apply patch 3.1) Perform same item search 3.2) Export as a CSV file and save the file locally 3.3) Open the file with a table/calc software 4.0) Compare files with diff/meld => you see double quotes arround header cells and removal of space after coma 4.1) Check that delimiter is from system preference 'delimiter' 4.2) In table/calc software they should look the same Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.02 released in| | --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.02 |21.05.00,20.11.02,20.05.08 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #22 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27164 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org