From bug 18925 comment 124: After updating to 19.05 with this patch included, circulation rules treated "Unlimited" in "Current checkouts allowed" and "Current on-site checkouts allowed" as 0 (zero) instead of infinite. Attempting to checkout items with an "Unlimited" maxissueqty or maxonsiteissueqty resulted in the error "• Too many checked out. 0 checked out, only are allowed.• This patron can't check out this item per library circulation policy" Circulation was allowed again after changing "Unlimited" to a numerical value. Currently, leaving the "Current checkouts allowed"/maxissueqty and "Current on-site checkouts allowed"/maxonsiteissueqty blank defaults to "Unlimited". Should either the default value be changed, or the code changed to treat the default value as infinite again, instead of zero?
Created attachment 90532 [details] [review] Bug 23104: Add tests
Created attachment 90533 [details] [review] Bug 23104: (bug 18925 follow-up): Fix null/empty behavior, again Not kidding, it's again, and will certainly appear more. The problem is that we should have a NULL value in DB to make things more readable and logical. Now we need a quick fix. Test plan: Set "Current checkouts allowed" to unlimited (empty string) Try to check an item out => Without this patch we are blocked with a "too many" message => With this patch applied the correct behavior is back!
Similar problem with "Current on-site checkouts allowed" as well. This only fixes "Current checkouts allowed"
Created attachment 90535 [details] [review] Bug 23104: Add tests Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 90536 [details] [review] Bug 23104: (bug 18925 follow-up): Fix null/empty behavior, again Not kidding, it's again, and will certainly appear more. The problem is that we should have a NULL value in DB to make things more readable and logical. Now we need a quick fix. Test plan: Set "Current checkouts allowed" to unlimited (empty string) Try to check an item out => Without this patch we are blocked with a "too many" message => With this patch applied the correct behavior is back! Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 90581 [details] [review] Bug 23104: Add tests for maxonsiteissueqty
(In reply to M. Tompsett from comment #3) > Similar problem with "Current on-site checkouts allowed" as well. This only > fixes "Current checkouts allowed" How that? Could you detail the steps to recreate?
Are we supposed to be able to set the number to 0? I thought we were Currently 0 turns into empty turns into unlimited
(In reply to Nick Clemens from comment #8) > Are we supposed to be able to set the number to 0? I thought we were > > Currently 0 turns into empty turns into unlimited We definitely need 0 too.
Created attachment 90666 [details] [review] Bug 23104: (follow-up) fix display for 0/Unlimited
Created attachment 90691 [details] [review] Bug 23104: Add tests Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 90692 [details] [review] Bug 23104: (bug 18925 follow-up): Fix null/empty behavior, again Not kidding, it's again, and will certainly appear more. The problem is that we should have a NULL value in DB to make things more readable and logical. Now we need a quick fix. Test plan: Set "Current checkouts allowed" to unlimited (empty string) Try to check an item out => Without this patch we are blocked with a "too many" message => With this patch applied the correct behavior is back! Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 90693 [details] [review] Bug 23104: Add tests for maxonsiteissueqty Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 90694 [details] [review] Bug 23104: (follow-up) fix display for 0/Unlimited Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.01
missing dependency for 18.11.x, wont backport