Bugzilla – Attachment 89863 Details for
Bug 22847
Specific circ rule by patron category is displaying the default (or not displaying)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22847: [18.11] Correctly displayed circ rule values for max_holds
Bug-22847-1811-Correctly-displayed-circ-rule-value.patch (text/plain), 2.32 KB, created by
Jonathan Druart
on 2019-05-16 17:32:31 UTC
(
hide
)
Description:
Bug 22847: [18.11] Correctly displayed circ rule values for max_holds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-16 17:32:31 UTC
Size:
2.32 KB
patch
obsolete
>From 8242334b16f3f4107dc13fa82bf5792386341c31 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 May 2019 12:31:23 -0500 >Subject: [PATCH] Bug 22847: [18.11] Correctly displayed circ rule values for > max_holds > >--- > Koha/Template/Plugin/CirculationRules.pm | 20 ++++++++++++++++++++ > .../prog/en/modules/admin/smart-rules.tt | 2 +- > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/Koha/Template/Plugin/CirculationRules.pm b/Koha/Template/Plugin/CirculationRules.pm >index d6c79c8c00..5446fe1519 100644 >--- a/Koha/Template/Plugin/CirculationRules.pm >+++ b/Koha/Template/Plugin/CirculationRules.pm >@@ -42,4 +42,24 @@ sub Get { > return $rule->rule_value if $rule; > } > >+sub Search { >+ my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; >+ >+ $branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; >+ $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; >+ $itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; >+ >+ my $rule = Koha::CirculationRules->search( >+ { >+ branchcode => $branchcode, >+ categorycode => $categorycode, >+ itemtype => $itemtype, >+ rule_name => $rule_name, >+ } >+ )->next; >+ >+ return $rule->rule_value if $rule; >+} >+ >+ > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index f42a63ba80..3b43f295f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -399,7 +399,7 @@ > <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty | html %]"/></td> > <td><input type="text" name="maxonsiteissueqty" size="3" value="[% default_maxonsiteissueqty | html %]"/></td> > <td> >- [% SET rule_value = CirculationRules.Get( current_branch, '*', undef, 'max_holds' ) %] >+ [% SET rule_value = CirculationRules.Search( current_branch, undef, undef, 'max_holds' ) %] > <input name="max_holds" size="3" value="[% rule_value | html %]" /> > </td> > <td> >-- >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 22847
:
89335
|
89373
|
89401
|
89439
| 89863