[Bug 41622] New: Make patron export use Koha::CSV
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 Bug ID: 41622 Summary: Make patron export use Koha::CSV Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41621 Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com Depends on| |41619 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41619 [Bug 41619] Add `Koha::CSV` https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41621 [Bug 41621] Use Koha::CSV everywhere [UMBRELLA] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 191469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191469&action=edit Bug 41622: Make patron export use Koha::CSV This patch introduces Koha::CSV::Patrons and updates misc/export_borrowers.pl to use it, providing consistent CSV generation with proper quoting and delimiter handling. Changes: - Add Koha::CSV::Patrons with dynamic field support - Update misc/export_borrowers.pl to use Koha::CSV::Patrons - Simplify export logic by removing manual CSV handling - Maintain all existing functionality (field selection, custom separator) The new class supports configurable field lists, making it flexible for different patron export scenarios while ensuring consistent CSV formatting. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/CSV/Patrons.t => SUCCESS: Tests pass! 3. Test patron export: k$ misc/export_borrowers.pl --show-header > patrons.csv => SUCCESS: CSV generated with all fields 4. Test with specific fields: k$ misc/export_borrowers.pl -H -f cardnumber -f surname -f firstname > patrons.csv => SUCCESS: Only specified fields exported 5. Test with custom separator: k$ misc/export_borrowers.pl -H -s=";" > patrons.csv => SUCCESS: Semicolon separator used 6. Open CSV in Excel => SUCCESS: Fields display correctly without quote issues 7. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 David Nind <david@davidnind.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=41622 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191469|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 191548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191548&action=edit Bug 41622: Make patron export use Koha::CSV This patch introduces Koha::CSV::Patrons and updates misc/export_borrowers.pl to use it, providing consistent CSV generation with proper quoting and delimiter handling. Changes: - Add Koha::CSV::Patrons with dynamic field support - Update misc/export_borrowers.pl to use Koha::CSV::Patrons - Simplify export logic by removing manual CSV handling - Maintain all existing functionality (field selection, custom separator) The new class supports configurable field lists, making it flexible for different patron export scenarios while ensuring consistent CSV formatting. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/CSV/Patrons.t => SUCCESS: Tests pass! 3. Test patron export: k$ misc/export_borrowers.pl --show-header > patrons.csv => SUCCESS: CSV generated with all fields 4. Test with specific fields: k$ misc/export_borrowers.pl -H -f cardnumber -f surname -f firstname > patrons.csv => SUCCESS: Only specified fields exported 5. Test with custom separator: k$ misc/export_borrowers.pl -H -s=";" > patrons.csv => SUCCESS: Semicolon separator used 6. Open CSV in Excel => SUCCESS: Fields display correctly without quote issues 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622 Bug 41622 depends on bug 41619, which changed state. Bug 41619 Summary: Add `Koha::CSV` https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41619 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org