Bug 20951

Summary: Koha::Patron::Discharge is missing use Koha::Patron::Debarments
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: PatronsAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, katrin.fischer, kyle.m.hall, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15548    
Bug Blocks: 20953    
Attachments: Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge

Description Fridolin Somers 2018-06-15 10:56:09 UTC
Koha::Patron::Discharge is missing use Koha::Patron::Debarments used in discharge() method.
Comment 1 Fridolin Somers 2018-06-15 11:03:53 UTC
Created attachment 76093 [details] [review]
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge

Koha::Patron::Discharge was missing use Koha::Patron::Debarments used in discharge() method.

Test plan :
1) Enable pref useDischarge
2) Go to OPAC user page
3) Go to 'ask for a discharge' tab
4) Click on 'Ask for a discharge'
5) Go to staff interface : /cgi-bin/koha/members/discharges.pl
6) Click on Allow
=> Without patch you get software error
=> With patch the discharge is validated
Comment 2 Katrin Fischer 2018-06-18 21:29:56 UTC
I can't reproduce the problem. I have tried discharging from the patron account as well as discharging using the link from the dashboard and the 'allow' button.

Similar to bug 20851?
Comment 3 Katrin Fischer 2018-06-19 06:15:54 UTC
Created attachment 76167 [details] [review]
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge

Koha::Patron::Discharge was missing use Koha::Patron::Debarments used in discharge() method.

Test plan :
1) Enable pref useDischarge
2) Go to OPAC user page
3) Go to 'ask for a discharge' tab
4) Click on 'Ask for a discharge'
5) Go to staff interface : /cgi-bin/koha/members/discharges.pl
6) Click on Allow
=> Without patch you get software error
=> With patch the discharge is validated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=20953
Comment 4 Jonathan Druart 2018-06-19 19:07:57 UTC
Created attachment 76194 [details] [review]
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge

Koha::Patron::Discharge was missing use Koha::Patron::Debarments used in discharge() method.

Test plan :
1) Enable pref useDischarge
2) Go to OPAC user page
3) Go to 'ask for a discharge' tab
4) Click on 'Ask for a discharge'
5) Go to staff interface : /cgi-bin/koha/members/discharges.pl
6) Click on Allow
=> Without patch you get software error
=> With patch the discharge is validated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Nick Clemens 2018-06-22 13:50:08 UTC
Awesome work all!

Pushed to master for 18.11.x
Comment 6 Martin Renvoize 2018-06-25 17:22:17 UTC
Pushed to 18.05.x for 18.05.02
Comment 7 Fridolin Somers 2018-06-28 06:56:28 UTC
(In reply to Katrin Fischer from comment #2)
> I can't reproduce the problem. I have tried discharging from the patron
> account as well as discharging using the link from the dashboard and the
> 'allow' button.
> 
> Similar to bug 20851?

I should have mentioned I'm in Plack env.
I see the explanation in Bug 20851. I think each module should explicitly call use on the modules they need.
Comment 8 Fridolin Somers 2018-06-28 06:56:50 UTC
Pushed to 17.11.x for 17.11.08
Comment 9 Fridolin Somers 2018-09-24 13:22:53 UTC
Pushed to 17.05.x for 17.05.14