Bugzilla – Attachment 169780 Details for
Bug 37382
Report download is empty except for headers if .tab format is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37382: Report download is empty except for headers if .tab format is selected
Bug-37382-Report-download-is-empty-except-for-head.patch (text/plain), 2.08 KB, created by
ByWater Sandboxes
on 2024-07-26 19:32:35 UTC
(
hide
)
Description:
Bug 37382: Report download is empty except for headers if .tab format is selected
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-07-26 19:32:35 UTC
Size:
2.08 KB
patch
obsolete
>From a98dee7c224482b75230b7e9622e890f98e0afd0 Mon Sep 17 00:00:00 2001 >From: CJ Lynce <cj.lynce@westlakelibrary.org> >Date: Fri, 26 Jul 2024 18:53:37 +0000 >Subject: [PATCH] Bug 37382: Report download is empty except for headers if > .tab format is selected > >When exporting a report in tab delimited format, the downloaded file > would have the header rows but no data results. >Also, misc files are created on the server file system in koha/reports > with data that should have been in the .tab file. >This patch fixes both of these issues. > >To test: >1. Login to staff client >2. Go to Reports and create a report from SQL - sample report > SELECT i.barcode, b.title, b.biblionumber, i.itemnumber > FROM items i > LEFT JOIN biblio b on i.biblionumber = b.biblionumber > WHERE i.itemnumber < 50 >3. Run the report >4. Click 'Download'->'Tab separated text' >5. Download file >6. Open file in a text editor or favorite spreadsheet app > File will have headers rows, but no other item data >6a. If able, check the server filesystem in koha/reports > There may be files there related to report data. Remove. >7. Apply Patch >8. Repeat steps 3-6, > File will now have the table data, hooray! >8a. If able, check the server filesystem in koha/reports > No new files should be created. > >Signed-off-by: Laura ONeil <laura@bywatersolutions.com> >--- > reports/guided_reports.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index b7c722945a..5b4397d392 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -633,7 +633,8 @@ elsif ($op eq 'export'){ > $content .= join("\t", header_cell_values($sth)) . "\n"; > $content = $scrubber->scrub( Encode::decode( 'UTF-8', $content ) ); > while ( my $row = $sth->fetchrow_arrayref() ) { >- $content .= join( "\t", $scrubber->scrub(@$row) ) . "\n"; >+ $content .= join( "\t", map { $_ // '' } @$row ) . "\n"; >+ $content = $scrubber->scrub( $content ); > } > } else { > if ( $format eq 'csv' ) { >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37382
:
169776
|
169780
|
170267