Bug 13330

Summary: All overdue items with fines returned via checkouts table will have fines forgiven!
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: CirculationAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low CC: barton, gmcharlt, jdemuth, kyle.m.hall, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!
Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!
Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!
[PASSED QA] Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!

Description Kyle M Hall (khall) 2014-11-24 16:50:03 UTC
Due to a disconnect between how booleans are handled in Perl vs JSON, all checkins done from the checkouts table will have fines forgiven! This is because the parameters sent to svc/checkin are coded in JSON and the JSON false is treated in Perl as the string 'false' which evaluates to true!
Comment 1 Kyle M Hall (khall) 2014-11-24 17:14:47 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2014-11-24 17:16:58 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2014-11-24 20:58:42 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-11-24 21:50:22 UTC
Created attachment 33883 [details] [review]
[PASSED QA] Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!

Due to a disconnect between how booleans are handled in Perl vs JSON,
all checkins done from the checkouts table will have fines forgiven!
This is because the parameters sent to svc/checkin are coded in JSON
and the JSON false is treated in Perl as the string 'false' which
evaluates to true!

Test Plan:
1) Find a patron with an overdue item that has a fine
2) Return the item via the checkouts table on circulation.pl or moremember.pl
3) Note the fine is forgiven
4) Apply this patch
5) Repeat steps 1-2
6) Note the fine is no longer forgiven

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Verified bug, fix corrects the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also tested waiving fines form the check-in page still works.
Passes tests and QA script.
Comment 5 Tomás Cohen Arazi (tcohen) 2014-11-25 18:38:18 UTC
Patch pushed to master.

Thanks Kyle!
Comment 6 Kyle M Hall (khall) 2014-12-01 14:02:36 UTC
*** Bug 13312 has been marked as a duplicate of this bug. ***