Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge
authorCharles Farmer <charles.farmer@inLibro.com>
Fri, 29 Jun 2018 20:12:59 +0000 (16:12 -0400)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 13 Jul 2018 11:57:22 +0000 (11:57 +0000)
commitd8d54d874a0c0764d42793a2f71d346c9c563d5a
treee26fcef7ac79b83e606d51c61b5d3af5ccc6d847
parent082583327e58e65ac595f998669b5c0262aef644
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Patron/Discharge.pm