View | Details | Raw Unified | Return to bug 26529
Collapse All | Expand All

(-)a/Koha/CirculationRules.pm (+5 lines)
Lines 62-73 our $RULE_KINDS = { Link Here
62
62
63
    holdallowed => {
63
    holdallowed => {
64
        scope => [ 'branchcode', 'itemtype' ],
64
        scope => [ 'branchcode', 'itemtype' ],
65
        can_be_blank => 0,
65
    },
66
    },
66
    hold_fulfillment_policy => {
67
    hold_fulfillment_policy => {
67
        scope => [ 'branchcode', 'itemtype' ],
68
        scope => [ 'branchcode', 'itemtype' ],
69
        can_be_blank => 0,
68
    },
70
    },
69
    returnbranch => {
71
    returnbranch => {
70
        scope => [ 'branchcode', 'itemtype' ],
72
        scope => [ 'branchcode', 'itemtype' ],
73
        can_be_blank => 0,
71
    },
74
    },
72
75
73
    article_requests => {
76
    article_requests => {
Lines 278-283 sub set_rule { Link Here
278
    my $itemtype     = $params->{itemtype};
281
    my $itemtype     = $params->{itemtype};
279
    my $rule_name    = $params->{rule_name};
282
    my $rule_name    = $params->{rule_name};
280
    my $rule_value   = $params->{rule_value};
283
    my $rule_value   = $params->{rule_value};
284
    my $can_be_blank = defined $kind_info->{can_be_blank} ? $kind_info->{can_be_blank} : 1;
285
    $rule_value = undef if $rule_value eq "" && !$can_be_blank;
281
286
282
    for my $v ( $branchcode, $categorycode, $itemtype ) {
287
    for my $v ( $branchcode, $categorycode, $itemtype ) {
283
        $v = undef if $v and $v eq '*';
288
        $v = undef if $v and $v eq '*';
(-)a/admin/smart-rules.pl (-3 lines)
Lines 341-348 elsif ($op eq "set-branch-defaults") { Link Here
341
    my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy');
341
    my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy');
342
    my $returnbranch  = $input->param('returnbranch');
342
    my $returnbranch  = $input->param('returnbranch');
343
    my $max_holds = strip_non_numeric( scalar $input->param('max_holds') );
343
    my $max_holds = strip_non_numeric( scalar $input->param('max_holds') );
344
    $holdallowed =~ s/\s//g;
345
    $holdallowed = undef if $holdallowed !~ /^\d+/;
346
344
347
    if ($branch eq "*") {
345
    if ($branch eq "*") {
348
        Koha::CirculationRules->set_rules(
346
        Koha::CirculationRules->set_rules(
349
- 

Return to bug 26529