Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven!
Summary: All overdue items with fines returned via checkouts table will have fines for...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low blocker
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
: 13312 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-24 16:50 UTC by Kyle M Hall (khall)
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

See Also:
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! (19.63 KB, patch)
2014-11-24 17:14 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven! (1.41 KB, patch)
2014-11-24 17:16 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven! (1.47 KB, patch)
2014-11-24 20:58 UTC, Liz Rea
Details | Diff | Splinter Review
[PASSED QA] Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven! (1.63 KB, patch)
2014-11-24 21:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***