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

(-)a/C4/Reserves.pm (-3 / +5 lines)
Lines 739-747 sub CheckReserves { Link Here
739
                    $patron ||= Koha::Patrons->find( $res->{borrowernumber} );
739
                    $patron ||= Koha::Patrons->find( $res->{borrowernumber} );
740
                    my $branch = GetReservesControlBranch( $iteminfo, $patron->unblessed );
740
                    my $branch = GetReservesControlBranch( $iteminfo, $patron->unblessed );
741
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});
741
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});
742
                    next if ($branchitemrule->{'holdallowed'} == 0);
742
                    if( !C4::Context->preference('TriggerForbiddenHolds') ) {
743
                    next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $patron->branchcode));
743
                        next if ($branchitemrule->{'holdallowed'} == 0);
744
                    next if ( ($branchitemrule->{hold_fulfillment_policy} ne 'any') && ($res->{branchcode} ne $iteminfo->{ $branchitemrule->{hold_fulfillment_policy} }) );
744
                        next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $patron->branchcode));
745
                        next if ( ($branchitemrule->{hold_fulfillment_policy} ne 'any') && ($res->{branchcode} ne $iteminfo->{ $branchitemrule->{hold_fulfillment_policy} }) );
746
                    }
745
                    $priority = $res->{'priority'};
747
                    $priority = $res->{'priority'};
746
                    $highest  = $res;
748
                    $highest  = $res;
747
                    last if $local_hold_match;
749
                    last if $local_hold_match;
(-)a/installer/data/mysql/atomicupdate/bug_20955_add_TriggerForbiddenwqHolds_syspref.perl (+8 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('TriggerForbiddenHolds','0', 'Consider holds that defy circulation/holds policies when checking items in', NULL, 'YesNo');");
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 20955 - Add TriggerForbiddenHolds system preference)\n";
8
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 569-574 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
569
('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'),
569
('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'),
570
('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'),
570
('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'),
571
('TranslateNotices','0',NULL, 'Allow notices to be translated','YesNo'),
571
('TranslateNotices','0',NULL, 'Allow notices to be translated','YesNo'),
572
('TriggerForbiddenHolds','0',NULL, 'Consider holds that defy circulation/holds policies when checking items in', 'YesNo'),
572
('UNIMARCAuthorityField100','afrey50      ba0',NULL,'Define the contents of UNIMARC authority control field 100 position 08-35','Textarea'),
573
('UNIMARCAuthorityField100','afrey50      ba0',NULL,'Define the contents of UNIMARC authority control field 100 position 08-35','Textarea'),
573
('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'),
574
('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'),
574
('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'),
575
('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 726-731 Circulation: Link Here
726
            - 'Example: "itemlost: 1" to set items.itemlost to 1 when the item is marked as lost'
726
            - 'Example: "itemlost: 1" to set items.itemlost to 1 when the item is marked as lost'
727
            - pref: UpdateItemWhenLostFromHoldList
727
            - pref: UpdateItemWhenLostFromHoldList
728
              type: textarea
728
              type: textarea
729
        -
730
            - pref: TriggerForbiddenHolds
731
              choices:
732
                  yes: Do
733
                  no: "Don't"
734
            - trigger holds that defy the circulation/holds policies.
729
    Interlibrary Loans:
735
    Interlibrary Loans:
730
        -
736
        -
731
            - pref: ILLModule
737
            - pref: ILLModule
732
- 

Return to bug 20955