Bug 18357

Summary: On-site checkouts issues with 'Unlimited'
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Nick Clemens (kidclamp) <nick>
Severity: major    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14045    
Bug Blocks:    
Attachments: Bug 18357: Handle unlimited on-site checkouts
Bug 18357: Handle unlimited on-site checkouts
Bug 18357: Handle unlimited on-site checkouts

Description Nick Clemens (kidclamp) 2017-03-30 20:51:30 UTC
When on-site checkouts are 'Unlimited' the checkouts can be blocked if there is a limit for checkouts in general

To reproduce:
Set All/All rule with Unlimited/unlimited for normal/onsite checkouts
Will be able to perform onsite checkout 
Edit rule to be 15/Unlimited normal/onsite
Will get error  'Too many: 1 on site checkout, only  are allowed'
Set rule to 15/15
Onsite checkouts work again

Similar issue with 
Default checkout, hold and return policy
and
Default checkout limit by patron category
Comment 1 Marc VĂ©ron 2017-03-31 06:02:35 UTC
Added Bug 18321 as related (problems with checkout count with onsite related sysprefs)
Comment 2 Jonathan Druart 2017-09-27 19:12:04 UTC
What wording do you suggest?
Comment 3 Nick Clemens (kidclamp) 2017-09-27 19:41:12 UTC
I don't think the wording is the problem, it is the implementation - instead of being 'unlimited' the rules are applying as 0
Comment 4 Jonathan Druart 2017-11-02 16:27:00 UTC
Created attachment 68896 [details] [review]
Bug 18357: Handle unlimited on-site checkouts

If on-site checkouts are set to unlimited (i.e. NULL/undef), they are
currently blocked.

Test plan:
1/ Set All/All rule with Unlimited/unlimited for normal/onsite checkouts
2/ Will be able to perform onsite checkout
3/ Edit rule to be 15/Unlimited normal/onsite
4/ Will be able to perform onsite checkout
=> Without this patch it was blocked
5/ Set rule to 15/15
6/ Onsite checkouts work again
Comment 5 David Bourgault 2017-11-03 19:10:20 UTC
Created attachment 68930 [details] [review]
Bug 18357: Handle unlimited on-site checkouts

If on-site checkouts are set to unlimited (i.e. NULL/undef), they are
currently blocked.

Test plan:
1/ Set All/All rule with Unlimited/unlimited for normal/onsite checkouts
2/ Will be able to perform onsite checkout
3/ Edit rule to be 15/Unlimited normal/onsite
4/ Will be able to perform onsite checkout
=> Without this patch it was blocked
5/ Set rule to 15/15
6/ Onsite checkouts work again

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 6 Nick Clemens (kidclamp) 2017-11-13 16:11:23 UTC
Created attachment 69129 [details] [review]
Bug 18357: Handle unlimited on-site checkouts

If on-site checkouts are set to unlimited (i.e. NULL/undef), they are
currently blocked.

Test plan:
1/ Set All/All rule with Unlimited/unlimited for normal/onsite checkouts
2/ Will be able to perform onsite checkout
3/ Edit rule to be 15/Unlimited normal/onsite
4/ Will be able to perform onsite checkout
=> Without this patch it was blocked
5/ Set rule to 15/15
6/ Onsite checkouts work again

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Jonathan Druart 2017-11-26 16:25:50 UTC
Pushed to master for 17.11, thanks to everybody involved!