Bug 18936: (follow-up) Add foreign key and scope enhancement to circ rules
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 24 Jan 2020 13:54:45 +0000 (14:54 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 4 Feb 2020 09:56:28 +0000 (09:56 +0000)
The previous patch modifies:
-                categorycode => undef,
-                itemtype     => undef,
-                branchcode   => $branch,
+                branchcode   => undef,

But in that condition $branchcode is not '*' and so we should not set it
to undef

Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

admin/smart-rules.pl

index 112efeb..4d4ec5a 100755 (executable)
@@ -555,7 +555,7 @@ elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) {
     } else {
         Koha::CirculationRules->set_rules(
             {
-                branchcode   => undef,
+                branchcode   => $branch,
                 rules        => {
                     refund => $refund
                 }