Bug 19928: Acquisitions' CSV exports now honors syspref "delimiter"
authorVictor Grousset <victor.grousset@biblibre.com>
Wed, 10 Jan 2018 15:07:36 +0000 (16:07 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 16 Feb 2018 01:25:45 +0000 (01:25 +0000)
commit002ec257b0a3ded0742d7834b889a915a7328dec
tree2e8e606146bc9f28aa5b321644097e368872eec7
parentaa78aab317945c58fa88aded20a173bb68c372f3
Bug 19928: Acquisitions' CSV exports now honors syspref "delimiter"

Bonus fixes:
- Basketgroup: there was an unnecessary space.
  " RRP tax excluded" replaced by "RRP tax excluded"
- Late orders:
  - leading spaces before every line
  - surrounding spaces for [% orders.size %]

Other changes:
- quoted "Total orders in late" to no worry about additional spaces
- Late orders: additional spaces which shouldn't be a problem because
  all the fields are enclosed by quotes.

Test plan:
1. Set syspref "delimiter" to "#'s"
2. Change the language e.g. FR-fr

3. Create a vendor with minimal info
4. Create a basket with two items
5. Go to the basket. URL should be
   /cgi-bin/koha/acqui/basket.pl?basketno=XXXXX
6. Close this basket
7. "Export as CSV"
8. You should see that the file contains commas "," This is the bug.
   Leave the file open for future comparison to ensure that there are
   no regressions.

9. Create a basket group with two baskets
   (tick the close this basket group check box)
10. Go to the "Closed" tab to see your basket group
11. "Export as CSV"
12. You should see that the file contains commas "," This is the bug.
    Leave the file open for future comparison to ensure that there are
    no regressions.

13. Go to /cgi-bin/koha/acqui/lateorders.pl
14. Tick two orders. Of the same vendor, otherwise Koha won't let you tick
    orders of different vendors.
15. "Export as CSV"
16. You should see that the file contains commas "," This is the bug.
    Leave the file open for future comparison to ensure that there are
    no regressions.

17. Apply this patch
18. Translation stuff
    1. cd misc/translator
    2. perl translate update YOUR_LANG
    3. manually edit the po file, remove the fuzzy tags.
       And translate the string. You can just copy the original and
       replace some parts by gibberish.
    4. perl translate install YOUR_LANG

19. Re-export the same CSVs and compare with the original version to check that
    - delimiter syspref is honored
    - the headers are translatable
    - there is no whitespace regression (additional newlines or spaces)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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/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