Bugzilla – Attachment 91966 Details for
Bug 18936
Move issuingrules into circulation_rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18936: Fix several issues
Bug-18936-Fix-several-issues.patch (text/plain), 2.14 KB, created by
Jonathan Druart
on 2019-08-04 20:10:21 UTC
(
hide
)
Description:
Bug 18936: Fix several issues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-08-04 20:10:21 UTC
Size:
2.14 KB
patch
obsolete
>From 4cb6b9062f27e558d4ab1ffda5b372a8c8180c11 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 7 Dec 2018 15:18:20 -0300 >Subject: [PATCH] Bug 18936: Fix several issues > >--- > Koha/CirculationRules.pm | 7 ++++--- > Koha/Template/Plugin/CirculationRules.pm | 4 ++-- > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm >index d462a2137d..fdcd9d5506 100644 >--- a/Koha/CirculationRules.pm >+++ b/Koha/CirculationRules.pm >@@ -240,14 +240,15 @@ sub get_effective_rules { > sub set_rule { > my ( $self, $params ) = @_; > >- for my $mandatory_parameter (qw( branchcode categorycode itemtype rule_name rule_value ) ) { >+ for my $mandatory_parameter (qw( rule_name rule_value ) ) { > Koha::Exceptions::MissingParameter->throw( >- "Required parameter 'branchcode' missing") >+ "Required parameter '$mandatory_parameter' missing") > unless exists $params->{$mandatory_parameter}; > } > > my $kind_info = $RULE_KINDS->{ $params->{rule_name} }; >- croak "set_rule given unknown rule '$params->{rule_name}'!" >+ Koha::Exceptions::MissingParameter->throw( >+ "set_rule given unknown rule '$params->{rule_name}'!") > unless defined $kind_info; > > # Enforce scope; a rule should be set for its defined scope, no more, no less. >diff --git a/Koha/Template/Plugin/CirculationRules.pm b/Koha/Template/Plugin/CirculationRules.pm >index 04587d4d51..2e40df9882 100644 >--- a/Koha/Template/Plugin/CirculationRules.pm >+++ b/Koha/Template/Plugin/CirculationRules.pm >@@ -30,14 +30,14 @@ sub Get { > $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; > $itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; > >- my $rule = Koha::CirculationRules->get_effective_rule( >+ my $rule = Koha::CirculationRules->search( > { > branchcode => $branchcode, > categorycode => $categorycode, > itemtype => $itemtype, > rule_name => $rule_name, > } >- ); >+ )->next; > > return $rule->rule_value if $rule; > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18936
:
65247
|
65248
|
65249
|
67629
|
67758
|
68236
|
71034
|
71035
|
71036
|
71037
|
71038
|
71039
|
71040
|
71041
|
72230
|
72231
|
72232
|
72233
|
72234
|
72235
|
72236
|
72237
|
72238
|
91953
|
91954
|
91955
|
91956
|
91957
|
91958
|
91959
|
91960
|
91961
|
91962
|
91963
|
91964
|
91965
|
91966
|
91967
|
91968
|
91969
|
91970
|
91971
|
91972
|
91973
|
91974
|
91975
|
94179
|
94180
|
94181
|
94182
|
94183
|
94184
|
94185
|
94186
|
94187
|
94188
|
94189
|
94190
|
94191
|
94192
|
94193
|
94194
|
94195
|
94196
|
94197
|
94198
|
94199
|
94200
|
98299
|
98300
|
98301
|
98302
|
98303
|
98304
|
98305
|
98306
|
98307
|
98308
|
98309
|
98310
|
98311
|
98312
|
98313
|
98314
|
98315
|
98316
|
98317
|
98318
|
98319
|
98320
|
98321
|
98322
|
98323
|
98324
|
98325
|
98326
|
98327
|
98328
|
98329
|
98330
|
98331
|
98332
|
98333
|
98334
|
98335
|
98336
|
98337
|
98338
|
98339
|
98340
|
98341
|
98342
|
98343
|
98344
|
98345
|
98346
|
98347
|
98407
|
98408