Tried to download a discharge slip from the OPAC, but received the following message: > An error occurs when generating the pdf file. Please contact the staff to resolve this problem. From the logs: > [Fri Jun 29 15:34:45.758105 2018] [cgi:error] [pid 10573] [client 127.0.0.1:44946] AH01215: [Fri Jun 29 15:34:45 2018] opac-discharge.pl: Undefined subroutine &C4::Letters::GetPreparedLetter called at /meow/Koha/Patron/Discharge.pm line 113.: /meow/opac/opac-discharge.pl, referer: http://master/cgi-bin/koha/opac-discharge.pl Will submit patch.
Created attachment 76588 [details] [review] Bug21025: Add GetPreparedLetter to Koha::Patron::Discharge Test plan (shamelessly ripped from Bug20953): 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron => Click on 'allow' on patron discharge request 7) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 8) Click on the link to get your generated PDF => An error message should appear informing you to contact your website's admin 9) Apply this patch 10) Click again on the link to get your generated PDF => This time, a download prompt should appear
Can't reproduce the problem, but we have seen similar recently and this will not hurt. Please don't forget to assign bugs to yourself when providing or planning to provide a patch!
Created attachment 76761 [details] [review] Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge Test plan (shamelessly ripped from Bug20953): 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron => Click on 'allow' on patron discharge request 7) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 8) Click on the link to get your generated PDF => An error message should appear informing you to contact your website's admin 9) Apply this patch 10) Click again on the link to get your generated PDF => This time, a download prompt should appear Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 76897 [details] [review] Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge Test plan (shamelessly ripped from Bug20953): 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron => Click on 'allow' on patron discharge request 7) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 8) Click on the link to get your generated PDF => An error message should appear informing you to contact your website's admin 9) Apply this patch 10) Click again on the link to get your generated PDF => This time, a download prompt should appear Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02
Pushed to 17.11.x for 17.11.09