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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Feb 2018 17:52:01 +0000 (14:52 -0300)
commit3e23c85bceb61f81c1487c1812844631fa0f9a5a
tree2caf51ac9e1c34b2e84be67cb1796b0ddbbab006
parentbc2a79f86b7fd9268ec4b2cd85f5a9c871bff12a
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>
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