https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41620

--- Comment #2 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 191468
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191468&action=edit
Bug 41620: Use Koha::CSV::ItemSearch for CSV exports

This patch replaces template-based CSV generation with Koha::CSV::ItemSearch
in both itemsearch.pl and item-export.pl, eliminating spacing issues around
delimiters that caused Excel to display quotes as literal characters.

Changes:
- Update itemsearch.pl to use Koha::CSV::ItemSearch
- Update item-export.pl to use Koha::CSV::ItemSearch
- Remove obsolete CSV templates
- Stream output directly without template overhead

This fixes the issue where extra spaces around commas in the templates
caused Excel to treat quotes as part of the data rather than CSV delimiters.

Test plan:
1. Apply patches
2. Test itemsearch.pl:
   a. Go to Cataloging > Item search
   b. Perform a search
   c. Click "Export results" > "CSV"
   d. Open items.csv in Excel
   => SUCCESS: Fields display without quotes
3. Test item-export.pl:
   a. Go to a bibliographic record
   b. Select multiple items
   c. Click "Export selected items"
   d. Open items.csv in Excel
   => SUCCESS: Fields display without quotes
4. Verify all 21 columns are present and correctly formatted
5. Verify dates, authorized values, and library names display correctly
6. Sign off :-D

-- 
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/

Reply via email to