[Bug 18321] New: One more checkouts possible than allowed by rules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Bug ID: 18321 Summary: One more checkouts possible than allowed by rules Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com It is possible to have one more checkouts than allowed by rules. To recreate: - Delete all rules in 'Circulation rules and fines'. - Set a Default limit by patron category, e.g. Student 2 current checkouts , 2 on-site-chekouts. - Checkout to a student until the limit is reached (in this case: 2) - Try a 3rd checkout; it is possible (should not) - Try a 4th checkout: No longer possible. Message says: "Too many checked out. 3 checked out, only 2 are allowed." Expected: Message should trigger with 3rd checkout, saying: "Too many checked out. 2 checked out, only 2 are allowed." -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18139 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18139 [Bug 18139] 'Too many checked out' can confuse librarians -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #1 from Marc Véron <veron@veron.ch> --- Suppose it happens in comparisons in C4/Circulation.pm -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I do not recreate, I get the warning on the 3rd checkouts. Are you checking out an on-site checkouts? If so what is the value of ConsiderOnSiteCheckoutsAsNormalCheckouts? How do you create the circ rule? I just filled "Current checkouts allowed" and "Current on-site checkouts allowed", let other values blank. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 61588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61588&action=edit Screenshot circulation rules (In reply to Jonathan Druart from comment #2)
I do not recreate, I get the warning on the 3rd checkouts. Are you checking out an on-site checkouts? If so what is the value of ConsiderOnSiteCheckoutsAsNormalCheckouts?
How do you create the circ rule? I just filled "Current checkouts allowed" and "Current on-site checkouts allowed", let other values blank.
- I tested with normal checkouts. - Just one circulation rule for students as described in my initial comment. - ConsiderOnSiteCheckoutsAsNormalCheckouts is: Consider -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #4 from Marc Véron <veron@veron.ch> --- With ConsiderOnSiteCheckoutsAsNormalCheckouts set to 'Don't consider' it is not possible to checkout 3 items, try to checkout the 3rd item, I get the message: "Too many checked out. 2 checked out, only 2 are allowed." => As expected With ConsiderOnSiteCheckoutsAsNormalCheckouts set to 'Consider' I can check out one more item than allowed as described in initial comment. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Would it be possible to get a screencast, or a sandbox set up with your settings? I still do not recreate. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 61646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61646&action=edit Screenshots to reproduce error Re-testing: - Set ConsiderOnSiteCheckoutsAsNormalCheckouts to 'Consider' - Delete all rules in 'Circulation rules and fines'. - Set a Default limit by patron category, e.g. Student with 2 current checkouts, 2 on-site-chekouts. - Normal (not On-Site) checkout to a student until the limit is reached (in this case: 2) - Try a 3rd checkout; it is possible (should not) - Try a 4th checkout: No longer possible. Message says: "Too many checked out. 3 checked out, only 2 are allowed." - Switch ConsiderOnSiteCheckoutsAsNormalCheckouts to 'Do not consider' - Check all items in - Repeat steps to reproduce - Checkout is blocked when trying to do 3rd checkout (as expected) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61588|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |normal --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sorry but still works for me. Did you test on a sandbox? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #8 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #7)
Sorry but still works for me. Did you test on a sandbox?
No. Anything not clear with my screenshots / description (Comment #6)? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Everything is clear, but works for me :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #10 from Marc Véron <veron@veron.ch> --- Hmm, thinking... The strange thing is that in my tests the behaviour depends on the status of syspref 'ConsiderOnSiteCheckoutsAsNormalCheckouts' With 'Do not consider' it works as expected, with 'Consider' I can check out one more than allowed (normal checkouts, not onsite checkouts). What are your settings for onsite sysprefs? (OnSiteCheckouts, OnSiteCheckoutsForce, SwitchOnSiteCheckouts, ConsiderOnSiteCheckoutsAsNormalCheckouts) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #11 from Marc Véron <veron@veron.ch> --- To reproduce, set following sysprefs: - ConsiderOnSiteCheckoutsAsNormalCheckouts: Consider - SwitchOnSiteCheckouts: Switch That triggers a $delta with value 1 to be added to $max_checkouts_allowed in C4/Circulation.pm line 485, allowing one more checkout. I could not figure out what this $delta stands for. It has a value of 1 if SwitchOnSiteCheckouts is set to 'Switch', otherwise it is 0. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18357 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on|18139 | Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18139 [Bug 18139] 'Too many checked out' can confuse librarians -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16272 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Caused by bug 16272. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16272 [Bug 16272] Transform checkout from on-site checkout to regular checkout -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61759&action=edit Bug 18321: Add tests Clean a bit existing tests by adding default values and add a test to highlight the issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61760 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61760&action=edit Bug 18321: Correctly calculate switch_onsite_checkout Silly error here, the $switch_onsite_checkout is not correctly calculated, it should not only be set to the value of the syspref, but meet all the conditions. Test plan: Set a circ rule with number of on-site checkout = 2 and number of checkouts = 2. Switch on both ConsiderOnSiteCheckoutsAsNormalCheckouts and SwitchOnSiteCheckouts Do a regular checkout Do another regular checkout At this point you have reach the maximum number of checkouts allowed. Not try another one. => Without this patch you will not get the warning => With this patch you will see it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61759|0 |1 is obsolete| | --- Comment #15 from Marc Véron <veron@veron.ch> --- Created attachment 61770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61770&action=edit Bug 18321: Add tests Clean a bit existing tests by adding default values and add a test to highlight the issue. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61760|0 |1 is obsolete| | --- Comment #16 from Marc Véron <veron@veron.ch> --- Created attachment 61771 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61771&action=edit Bug 18321: Correctly calculate switch_onsite_checkout Silly error here, the $switch_onsite_checkout is not correctly calculated, it should not only be set to the value of the syspref, but meet all the conditions. Test plan: Set a circ rule with number of on-site checkout = 2 and number of checkouts = 2. Switch on both ConsiderOnSiteCheckoutsAsNormalCheckouts and SwitchOnSiteCheckouts Do a regular checkout Do another regular checkout At this point you have reach the maximum number of checkouts allowed. Not try another one. => Without this patch you will not get the warning => With this patch you will see it Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #17 from Marc Véron <veron@veron.ch> --- Jonathan, this Bug was marked as assigned but the patches work, so I assume that you forgot to set to NSO. Switching to NSO and then to Signed off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #17)
Jonathan, this Bug was marked as assigned but the patches work, so I assume that you forgot to set to NSO. Switching to NSO and then to Signed off
Yes indeed, I forgot to change the status. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61770|0 |1 is obsolete| | --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62076 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62076&action=edit Bug 18321: Add tests Clean a bit existing tests by adding default values and add a test to highlight the issue. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61771|0 |1 is obsolete| | --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62077&action=edit Bug 18321: Correctly calculate switch_onsite_checkout Silly error here, the $switch_onsite_checkout is not correctly calculated, it should not only be set to the value of the syspref, but meet all the conditions. Test plan: Set a circ rule with number of on-site checkout = 2 and number of checkouts = 2. Switch on both ConsiderOnSiteCheckoutsAsNormalCheckouts and SwitchOnSiteCheckouts Do a regular checkout Do another regular checkout At this point you have reach the maximum number of checkouts allowed. Not try another one. => Without this patch you will not get the warning => With this patch you will see it Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #21 from Marc Véron <veron@veron.ch> --- kyle@bywatersolutions.com 2017-04-13 12:28:01 UTC CC kyle@bywatersolutions.com Status Passed QA Patch doesn't apply Re-tested on current master 16.12.00.022, patch applies fine here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #21)
kyle@bywatersolutions.com 2017-04-13 12:28:01 UTC CC kyle@bywatersolutions.com Status Passed QA Patch doesn't apply
Re-tested on current master 16.12.00.022, patch applies fine here.
Same here, please retest. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 --- Comment #23 from Marc Véron <veron@veron.ch> --- Re-tested on current master, 16.12.00.024 Before applying, head is 36fd404 Bug 17835: [QA Follow-up] Fix opac-search.pl git bz apply 18321 Both patches apply. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #24 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |katrin.fischer@bsz-bw.de --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.07. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18321 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18357 | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org