[Bug 24026] New: Wrong parameters in Koha/Templates/Plugin/CirculationRules.pm and smart-rules.tt
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Bug ID: 24026 Summary: Wrong parameters in Koha/Templates/Plugin/CirculationRules.pm and smart-rules.tt Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com The searches in the module use $branchcode for all three parameters, looks like a copy/paste issue 29 $branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; 30 $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; 31 $itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; The admin page uses 'Get' instead of 'Search' for maxisseqty/maxonsiteissueqty - this returns the 'effective' rule and so may return the wrong rule if things are not set 139 <td> 140 [% SET rule_value = CirculationRules.Get( rule.branchcode, rule.categorycode, rule.itemtype, 'maxissueqty' ) %] 141 [% IF rule_value || rule_value == "0" %] 142 [% rule_value | html %] 143 [% ELSE %] 144 <span>Unlimited</span> 145 [% END %] 146 </td> We discovered this from upgrade issues resulting from bug 23813 -- 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=24026 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kelly@bywatersolutions.com, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Depends on| |22847 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- ARG! Impossible, I never copy paste, never! Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 [Bug 22847] Specific circ rule by patron category is displaying the default (or not displaying) -- 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=24026 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95365&action=edit Bug 24026: (bug 22847 follow-up) Remove c/p issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95366&action=edit Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones) See bug 22847. We should never call ->Search in this template, we want to display the values in the DB, not the calculated ones -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Upping severity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Nick Clemens <nick@bywatersolutions.com> 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=24026 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95365|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 95369 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95369&action=edit Bug 24026: (bug 22847 follow-up) Remove c/p issues 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=24026 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95366|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 95370 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95370&action=edit Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones) See bug 22847. We should never call ->Search in this template, we want to display the values in the DB, not the calculated ones 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=24026 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #3)
See bug 22847. We should never call ->Search in this template, we want to display the values in the DB, not the calculated ones
We should never call 'Get', we should always use 'Search' - I think just the comment was wrong -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- To test: Add a standard rule for all libraries with maxisseqty and maxonsiteissueqty set to some value, say 5 Add several itemtype or categorycode specific rules, leaving max checkouts/onsite as blank to get unlimited Set an itemtype or cateogory specific rule for a branch as well. Remove the specific rules from the DB: delete from circulation_rules WHERE itemtype IS NOT NULL OR categorycode IS NOT NULL; Note that all rules for all libraries use the 'All/All' checkout limit Note that the specific library does as well Apply patch unset rules appear as unlimited now Note:thigns still won't work in this state, as we are introducing bad data, but it helps 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=24026 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95370|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95373&action=edit Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones) See bug 22847. We should never call ->Get in this template, we want to display the values in the DB, not the calculated ones 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=24026 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Nick Clemens from comment #7)
(In reply to Jonathan Druart from comment #3)
See bug 22847. We should never call ->Search in this template, we want to display the values in the DB, not the calculated ones
We should never call 'Get', we should always use 'Search' - I think just the comment was wrong
Move confusion, more fun! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95369|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95386&action=edit Bug 24026: (bug 22847 follow-up) Remove c/p issues Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95373|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95387&action=edit Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones) See bug 22847. We should never call ->Get in this template, we want to display the values in the DB, not the calculated ones Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Martin Renvoize <martin.renvoize@ptfs-europe.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=24026 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org