Summary: | Print payment receipt on child patron could end with server error | ||
---|---|---|---|
Product: | Koha | Reporter: | Josef Moravec <josef.moravec> |
Component: | Patrons | Assignee: | Josef Moravec <josef.moravec> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, gmcharlt, jonathan.druart, 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: | 19921 | ||
Bug Blocks: | |||
Attachments: |
Bug 20903: Remove unnecessary category code parameters
Bug 20903: Remove unnecessary category code parameters Bug 20903: Remove unnecessary category code parameters |
Description
Josef Moravec
2018-06-08 09:41:21 UTC
Created attachment 75915 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt Comment on attachment 75915 [details] [review] Bug 20903: Remove unnecessary category code parameters Review of attachment 75915 [details] [review]: ----------------------------------------------------------------- ::: members/printfeercpt.pl @@ -60,5 @@ > > -if ( $patron->is_child ) { > - my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']}); > - $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; > - $template->param( 'catcode' => $patron_categories->next->categorycde ) if $patron_categories->count == 1; This is the code which causes problem ('categorycde' instead of 'categorycode'). But as this code is not needed, I removed whole block of code. Raising severity as this generates ISE. Created attachment 76424 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 76454 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Caused by commit 585453fe20417779be84258b60d3d652d8e170e1 Bug 19921: Fix update child when only one adult patron category exist 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.08 Pushed to 17.05.x for 17.05.14 |