| Summary: | CSV export of cash register misses newlines | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Michael Kuhn <mik> |
| Component: | Reports | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | koha, maude.boudreau |
| Version: | 21.11 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 29271 | ||
| Bug Blocks: | |||
|
Description
Michael Kuhn
2022-01-28 10:59:18 UTC
This is probably due to the translation tools removing \n new lines. There is also a common fix for this we used for other csv exports. Confirmed in 20.11 I thik 29271 is the culprit, as it removed the explicit newlines: [%- INCLUDE empty_line.inc -%] They are not needed in English, but very much needed for the translated templates, as the translation process removes any new lines... This appears to work well: [%- USE ItemTypes -%] [%- INCLUDE csv_headers/reports/cash_register_stats.tt -%] [%- INCLUDE empty_line.inc -%] [%- FOREACH row IN rows -%] [%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END -%] [%- INCLUDE empty_line.inc -%] [%- END -%] TOTAL[%- INCLUDE empty_line.inc -%] Hm, have to check into the total not getting printed (might be our old version, but in case someone wants to do more work here) *** Bug 30704 has been marked as a duplicate of this bug. *** Minor correction for the TOTAL line: [%- USE ItemTypes -%] [%- INCLUDE csv_headers/reports/cash_register_stats.tt -%] [%- INCLUDE empty_line.inc -%] [%- FOREACH row IN rows -%] [%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END -%] [%- INCLUDE empty_line.inc -%] [%- END -%] TOTAL[% sep %][%- FOREACH field IN total; field; sep IF !loop.last; END -%] +1 |