]> git.koha-community.org Git - koha.git/commit
Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 18 Feb 2019 16:33:37 +0000 (17:33 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 26 Mar 2019 06:30:27 +0000 (07:30 +0100)
commit37aa8461272cc70a3cf53f788f245402ab28556b
treee99e84d6f1ea23872d5d05967d6e12b5d4befe94
parente14da89d104ed1fd62136baafba60d42de9380b7
Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation

There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ffb40290f88380418635a951dbb0788bf7b7e3ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2531f6fef7f741f6557add3f8981148c55c15ce)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f68db17b9e2b5e6ece289a312f1a53f8d9a3d53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Util/OpenDocument.pm [new file with mode: 0644]
misc/cronjobs/gather_print_notices.pl
reports/guided_reports.pl