[Koha-bugs] [Bug 24026] New: Wrong parameters in Koha/Templates/Plugin/CirculationRules.pm and smart-rules.tt

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 12 19:08:07 CET 2019


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 at lists.koha-community.org
          Reporter: nick at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at 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.


More information about the Koha-bugs mailing list