Bugzilla – Attachment 110686 Details for
Bug 26529
Holds rules enforced incorrectly when not set at library level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26529: Set rule value to undef when not setfor branch defaults
Bug-26529-Set-rule-value-to-undef-when-not-setfor-.patch (text/plain), 3.05 KB, created by
Nick Clemens (kidclamp)
on 2020-09-24 18:11:34 UTC
(
hide
)
Description:
Bug 26529: Set rule value to undef when not setfor branch defaults
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-24 18:11:34 UTC
Size:
3.05 KB
patch
obsolete
>From 9464d665c60032e26e419de125c52437064bd01d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 24 Sep 2020 18:10:54 +0000 >Subject: [PATCH] Bug 26529: Set rule value to undef when not setfor branch > defaults > >--- > Koha/CirculationRules.pm | 4 +++- > admin/smart-rules.pl | 8 +++----- > tools/manage-marc-import.pl | 2 +- > 3 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm >index 87062f541a..a037e42715 100644 >--- a/Koha/CirculationRules.pm >+++ b/Koha/CirculationRules.pm >@@ -250,7 +250,7 @@ sub get_effective_rules { > > sub set_rule { > my ( $self, $params ) = @_; >- >+warn Data::Dumper::Dumper( $params ); > for my $mandatory_parameter (qw( rule_name rule_value ) ) { > Koha::Exceptions::MissingParameter->throw( > "Required parameter '$mandatory_parameter' missing") >@@ -302,6 +302,7 @@ sub set_rule { > } > else { > if ( defined $rule_value ) { >+ warn "presumably here"; > $rule = Koha::CirculationRule->new( > { > branchcode => $branchcode, >@@ -333,6 +334,7 @@ sub set_rules { > > my $rule_objects = []; > while ( my ( $rule_name, $rule_value ) = each %$rules ) { >+ warn "name: $rule_name, value: $rule_value"; > my $rule_object = Koha::CirculationRules->set_rule( > { > %set_params, >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 4a4727e5c2..51bfb667b2 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -337,12 +337,10 @@ elsif ($op eq "set-branch-defaults") { > my $patron_maxissueqty = strip_non_numeric( scalar $input->param('patron_maxissueqty') ); > my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); > $patron_maxonsiteissueqty = strip_non_numeric($patron_maxonsiteissueqty); >- my $holdallowed = $input->param('holdallowed'); >- my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); >- my $returnbranch = $input->param('returnbranch'); >+ my $holdallowed = $input->param('holdallowed') || undef; >+ my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy') || undef; >+ my $returnbranch = $input->param('returnbranch') || undef; > my $max_holds = strip_non_numeric( scalar $input->param('max_holds') ); >- $holdallowed =~ s/\s//g; >- $holdallowed = undef if $holdallowed !~ /^\d+/; > > if ($branch eq "*") { > Koha::CirculationRules->set_rules( >diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl >index 04c62e267c..88e85f0835 100755 >--- a/tools/manage-marc-import.pl >+++ b/tools/manage-marc-import.pl >@@ -42,7 +42,7 @@ my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl"; > my $input = new CGI; > my $op = $input->param('op') || ''; > my $completedJobID = $input->param('completedJobID'); >-our $runinbackground = $input->param('runinbackground'); >+our $runinbackground = 0;#$input->param('runinbackground'); > my $import_batch_id = $input->param('import_batch_id') || ''; > > # record list displays >-- >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 26529
:
110686
|
110687
|
110695
|
110714
|
110715
|
110856
|
110857
|
110859
|
111251
|
111252
|
111253
|
111382
|
111471
|
111511