https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41622
--- Comment #2 from David Nind <[email protected]> --- 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 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
