Bugzilla – Attachment 38955 Details for
Bug 14103
PDF::FromHTML headaches related to optional discharging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14103: PDF::FromHTML is conditionally required on UseDischarge systempreference
PASSED-QA-Bug-14103-PDFFromHTML-is-conditionally-r.patch (text/plain), 2.41 KB, created by
Kyle M Hall (khall)
on 2015-05-07 16:02:51 UTC
(
hide
)
Description:
[PASSED QA] Bug 14103: PDF::FromHTML is conditionally required on UseDischarge systempreference
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-05-07 16:02:51 UTC
Size:
2.41 KB
patch
obsolete
>From 3999686d7dd47cf660709485a44bdf7413527b4a Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 6 May 2015 01:08:04 -0400 >Subject: [PATCH] [PASSED QA] Bug 14103: PDF::FromHTML is conditionally required on UseDischarge systempreference > >Since this is only in generate_as_pdf of Koha::Borrowers::Discharge, it made >sense to change it from a use to a require (avoiding a compile time error), >and placing it inside the eval where the PDF is generated, thus capturing the >problem in the koha error log. > >TEST PLAN >--------- >1) Log in to staff client >2) Koha Administration -> Global system preferences -> Local Use >3) Lower the Version number by 1, but DO NOT CLICK SAVE. >4) At the command line, sudo apt-get purge libpdf-fromhtml-perl >5) Back in the staff client, click save. >6) Every looks great until you attempt to log in. KABOOM! >7) Apply patch >8) Log in to staff client > -- YAY! >9) Koha Administration -> Global system preferences -> Patrons >10) Make use the useDischarge is set to Allow >11) Find a patron with nothing checked out. >12) There is now a Discharge tab on the left at the bottom. >13) Click the 'Generate Discharge' button. > -- nice error message > -- check koha error log file for the ugly @INC missing message >14) At the command line, reinstall PDF::FromHTML > (I built my own with cpan2deb: sudo dpkg -i /path/to/libpdf-fromhtml-perl_...) >15) In the staff client, click the 'Generate Discharge' button again. > -- PDF is created as expected. All is well. >16) run koha qa test tools. > >Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Borrower/Discharge.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/Koha/Borrower/Discharge.pm b/Koha/Borrower/Discharge.pm >index ea84f78..9ca1587 100644 >--- a/Koha/Borrower/Discharge.pm >+++ b/Koha/Borrower/Discharge.pm >@@ -3,7 +3,6 @@ package Koha::Borrower::Discharge; > use Modern::Perl; > use CGI; > use File::Temp qw( :POSIX ); >-use PDF::FromHTML; > > use C4::Members qw( GetPendingIssues ); > use C4::Reserves qw( GetReservesFromBorrowernumber CancelReserve ); >@@ -114,6 +113,7 @@ sub generate_as_pdf { > open my $html_fh, '>:encoding(utf8)', $html_path; > say $html_fh $html_content; > close $html_fh; >+ require PDF::FromHTML; > my $pdf = PDF::FromHTML->new( encoding => 'utf-8' ); > $pdf->load_file( $html_path ); > $pdf->convert; >-- >1.7.2.5
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 14103
:
38837
|
38881
|
38883
|
38899
|
38943
| 38955 |
38956