[Bug 8137] New: Checkout limit by patron category for all libraries
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Priority: P5 - low Change sponsored?: --- Bug ID: 8137 CC: gmcharlt@gmail.com Assignee: kyle.m.hall@gmail.com Summary: Checkout limit by patron category for all libraries Severity: enhancement Classification: Unclassified OS: All Reporter: kyle.m.hall@gmail.com Hardware: All Status: NEW Version: master Component: Circulation Product: Koha We have a patron category Temporary Adult WTMP. Under "Checkout limit by patron category for all libraries" the limit is set to 5. This limit is not working. I was able to check out 7 items to Robert Harper (24388200094358)in the WTMP category Here is what is going on. We have the system preference CircControl set to "Use the checkout and fines rules of *the library where the item is from*". we also have this limit set to 5. So what Koha is doing, is comparing the limit to the number of checkouts of items the borrower has *from the same home library as that item*. If the item's home library is LibA, and the borrower has 4 items checked out whose home library is LibA, than the item will be checked out ( regardless of how many items are checked out ). If the borrower has 5 items checked out whose home library is LibA, Koha will indeed warn of too many checkouts. This does not seem intuitive. Is there any way to globally limit the number if checkouts a borrower can have by patron category? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 --- Comment #1 from Kyle M Hall <kyle.m.hall@gmail.com> --- Just for reference, the relevant code is located in C4::Circulation::TooMany, right near the end of the subroutine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 --- Comment #2 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 9705 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9705&action=edit Bug 8137 - Checkout limit by patron category for all libraries We have a patron category Temporary Adult WTMP. Under "Checkout limit by patron category for all libraries" the limit is set to 5. This limit is not working. I was able to check out 7 items to a patron in the WTMP category. If the item's home library is LibA, and the borrower has 4 items checked out whose home library is LibA, than the item will be checked out ( regardless of how many items are checked out ). If the borrower has 5 items checked out whose home library is LibA, Koha will indeed warn of too many checkouts. I think circcontrol is being mis-used here. It should use the maxissueqty for the item's home library ( or fallback to the 'all libraries' rule ), but it should still count all issues from any library -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9705|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 9706 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9706&action=edit Bug 8137 - Checkout limit by patron category for all libraries We have a patron category Temporary Adult WTMP. Under "Checkout limit by patron category for all libraries" the limit is set to 5. This limit is not working. I was able to check out 7 items to a patron in the WTMP category. If the item's home library is LibA, and the borrower has 4 items checked out whose home library is LibA, than the item will be checked out ( regardless of how many items are checked out ). If the borrower has 5 items checked out whose home library is LibA, Koha will indeed warn of too many checkouts. I think circcontrol is being mis-used here. It should use the maxissueqty for the item's home library ( or fallback to the 'all libraries' rule ), but it should still count all issues from any library -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9706|0 |1 is obsolete| | --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 11079 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11079&action=edit [SIGNED-OFF] Bug 8137 - Checkout limit by patron category for all libraries We have a patron category Temporary Adult WTMP. Under "Checkout limit by patron category for all libraries" the limit is set to 5. This limit is not working. I was able to check out 7 items to a patron in the WTMP category. If the item's home library is LibA, and the borrower has 4 items checked out whose home library is LibA, than the item will be checked out ( regardless of how many items are checked out ). If the borrower has 5 items checked out whose home library is LibA, Koha will indeed warn of too many checkouts. I think circcontrol is being mis-used here. It should use the maxissueqty for the item's home library ( or fallback to the 'all libraries' rule ), but it should still count all issues from any library Signed-off-by: Marc Veron <veron@veron.ch> How I teested: Set patrons category restriction to 2 checkouts. Set checkout restrictions for libraries to 10 checkouts. Without patch, I could checkout more items than allowed by patrons category restriction (but only if items from different libraries were involved). With patch, the patrons category restriction was respected (warning: 'Too many checked out. 2 checked out, only 2 are allowed.'). Patch behaves as described.expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA Comment: This patch is highly sensible, because it changes Circulation behaviour. It replaces: SELECT COUNT(*) FROM issues JOIN items USING (itemnumber) WHERE borrowernumber = ? AND issues.branchcode = ? (or AND items.homebranch = ? or nothing, depending on sysprefs) by a simple SELECT COUNT(*) FROM issues WHERE borrowernumber = ? Digging into the code, I see that the comparison is made against GetBranchBorrowerCircRule, which retrieve data from branch_borrower_circ_rules Looking at admin/smart-rules.pl, I see that the description says: ========= Checkout limit by patron category for <<LIBRARY NAME>> For this library, you can specify the maximum number of loans that a patron of a given category can make, regardless of the item type. If the total amount loanable for a given patron category is left blank, no limit applies, except possibly for a limit you define for a specific item type. ========= I feel it's unclear. What does "For this library" mean exactly ? is it "for items checked out from this library" "For patrons registered at this library" ? The sub GetBranchBorrowerCircRule is called with $branch and $cat_borrower parameters $branch is filled depending on sysprefs by _GetCircControlBranch, that return a value depending on CircControl syspref the patch, if I understand it well, understand the smart-rule.pl description as: "For patrons registered to this library, you can specify the maimum number of loans, all branches included" So it discard the behaviour: "You can specify the maximum number of loans that a patron can do from this library" As a conclusion, I feel that this patch could unplease some libraries. Maybe more explanations are needed on smart-rules.pl. Is there something I misunderstood ? (Am I clear in my explanations -because it's quite tricky- ?) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m QA Contact| |paul.poulain@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- I change the status to in discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr --- Comment #7 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- The Circcontrol had to take into account the table default_borrower_circ_rules. This table is filled with values added in smart-rules.pl when selected libraries is "all libraries". I'm not sure that we have to check circcontrol here cause the limit is true for all the libraries so you don't matter if it's the library of patrons or items. In Circulation.pm, we can read : "maxissueqty - maximum number of loans that a patron of the given category can have at the given branch. If the value is undef, no limit. This will first check for a specific branch and category match from branch_borrower_circ_rules. If no rule is found, it will then check default_branch_circ_rules (same branch, default category). If no rule is found, it will then check default_borrower_circ_rules (default branch, same category), then failing that, default_circ_rules default branch, default category)." The problem is in "if no rule is found". I think the level defined for all libraries must win on the level for each library. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8371 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Kyle, ping !!! You haven't answered my last-august question, and this patch seems lost in limbos. Could you answer and try to have it exiting from "in discussion" ? thx (In reply to comment #5)
QA Comment:
This patch is highly sensible, because it changes Circulation behaviour. It replaces: SELECT COUNT(*) FROM issues JOIN items USING (itemnumber) WHERE borrowernumber = ? AND issues.branchcode = ? (or AND items.homebranch = ? or nothing, depending on sysprefs)
by a simple SELECT COUNT(*) FROM issues WHERE borrowernumber = ?
Digging into the code, I see that the comparison is made against GetBranchBorrowerCircRule, which retrieve data from branch_borrower_circ_rules
Looking at admin/smart-rules.pl, I see that the description says: ========= Checkout limit by patron category for <<LIBRARY NAME>>
For this library, you can specify the maximum number of loans that a patron of a given category can make, regardless of the item type.
If the total amount loanable for a given patron category is left blank, no limit applies, except possibly for a limit you define for a specific item type. =========
I feel it's unclear. What does "For this library" mean exactly ? is it "for items checked out from this library" "For patrons registered at this library" ?
The sub GetBranchBorrowerCircRule is called with $branch and $cat_borrower parameters $branch is filled depending on sysprefs by _GetCircControlBranch, that return a value depending on CircControl syspref
the patch, if I understand it well, understand the smart-rule.pl description as: "For patrons registered to this library, you can specify the maimum number of loans, all branches included" So it discard the behaviour: "You can specify the maximum number of loans that a patron can do from this library"
As a conclusion, I feel that this patch could unplease some libraries. Maybe more explanations are needed on smart-rules.pl.
Is there something I misunderstood ? (Am I clear in my explanations -because it's quite tricky- ?)
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Sorry! The answer is "For patrons registered at this library".
You haven't answered my last-august question, and this patch seems lost in limbos. Could you answer and try to have it exiting from "in discussion" ?
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle, I know this is quite an old patch, but as it is in a sensitive area, could we add a hint on the circulation rules page to make it more clear and have some regression tests please? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8137 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org