]> git.koha-community.org Git - koha.git/commit
Bug 28327: Unify CSV delimiter special behavior for tabulation
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 12 May 2021 10:00:31 +0000 (12:00 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 19 Aug 2022 18:53:12 +0000 (15:53 -0300)
commit381b79593e2a86c4d856242a1f6e955d95ae1f24
tree9c777e7486881804b54c1c588c2185c4f44a90f6
parenta2e9b440742bb3e207d1906d3c478b936eb277f2
Bug 28327: Unify CSV delimiter special behavior for tabulation

System preference 'CSVdelimiter' has a special case for tabulation.
Preference value contains string 'tabulation' but string '\t' must be used in CSV file.

This is OK in many places, for exemple Bug 17590.

This patch adds C4::Context->csv_delimiter to add a uniq metod dealing
with this behavior.
Also create Koha::Template::Plugin::Koha->CSVDelimiter for calls from
Toolkit Templates.

Test plan :
1) Set system preference 'CSVdelimiter' = 'tabs'.
2) Create CSV export in impacted pages
3) Check columns are separated by tabulation character and not string 'tabulation'
4) Check with another delimiter

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
27 files changed:
C4/Context.pm
Koha/Template/Plugin/Koha.pm
admin/aqplan.pl
koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc
koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt
koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt
koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt
misc/cronjobs/overdue_notices.pl
misc/export_borrowers.pl
reports/acquisitions_stats.pl
reports/bor_issues_top.pl
reports/borrowers_out.pl
reports/borrowers_stats.pl
reports/cash_register_stats.pl
reports/cat_issues_top.pl
reports/catalogue_stats.pl
reports/guided_reports.pl
reports/issues_avg_stats.pl
reports/issues_stats.pl
reports/orders_by_fund.pl
reports/reserves_stats.pl
reports/serials_stats.pl
tools/viewlog.pl