Bug 12622 - Exporting report as Open Document Spreadsheet results in Perl error when report has no results
Summary: Exporting report as Open Document Spreadsheet results in Perl error when repo...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 12888 13010 (view as bug list)
Depends on: 11679
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-22 07:47 UTC by Katrin Fischer
Modified: 2015-06-04 23:30 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12622: Fix export report as ods (2.23 KB, patch)
2014-07-22 10:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Signed off patch (2.23 KB, patch)
2014-07-25 03:23 UTC, Robert Higgins
Details | Diff | Splinter Review
[PASSED QA] Bug 12622: Fix export report as ods (2.45 KB, patch)
2014-07-25 06:37 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-07-22 07:47:42 UTC
To test:
- Run a custom report that produces results
- Export as Open Document Spreadsheet
- Verify export worked correctly

- Run a custom report that produces no results
- Export as Open Document Spreadsheet
- Verify you see a perl error:

Can't use an undefined value as an ARRAY reference at /usr/share/koha/intranet/cgi-bin/reports/guided_reports.pl line 817.
Comment 1 Jonathan Druart 2014-07-22 10:19:40 UTC Comment hidden (obsolete)
Comment 2 Robert Higgins 2014-07-25 03:23:15 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-07-25 06:37:04 UTC
Created attachment 30074 [details] [review]
[PASSED QA] Bug 12622: Fix export report as ods

Bug 11679 introduces an ods export for reports.

It looks quite buggy:
1/ You get a Perl error if the report has no results
2/ The ods file contains 1 lines less than the total results.

Test plan:
After applying this patch, try to export a report which has no results
and verify you get an ods file with headers only.
Try to export a report which has a least 1 result and verify the
generated ods has the right number of lines.

Signed-off-by: Robert Higgins <robert.higgins@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the reported problem, passes all tests and QA script.
Added the sign-off line for Robert.
Comment 4 Katrin Fischer 2014-07-25 06:38:19 UTC
Resetting Assigned to to Jonathan - as he is the patch writer. Thx for testing Robert!
Comment 5 Tomás Cohen Arazi 2014-07-29 14:49:32 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 6 Galen Charlton 2014-08-26 22:41:24 UTC
Pushed to 3.16.x for inclusion in 3.16.3.
Comment 7 Katrin Fischer 2014-10-13 23:09:16 UTC
*** Bug 13010 has been marked as a duplicate of this bug. ***
Comment 8 Katrin Fischer 2014-10-13 23:09:37 UTC
*** Bug 12888 has been marked as a duplicate of this bug. ***