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

(-)a/installer/data/mysql/atomicupdate/bug_22866.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "22866",
5
    description => "Add new syspref AllowRenewalItemsDeniedOverride",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES
12
            ('AllowRenewalItemsDeniedOverride','0','','If ON, allow items on hold to be renewed by staff even if disallowed by ItemsDeniedRenewal','YesNo');
13
        });
14
    },
15
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 44-49 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
44
('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'),
44
('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'),
45
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
45
('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'),
46
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
46
('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'),
47
('AllowRenewalItemsDeniedOverride','0',NULL,'If ON, allow items on hold to be renewed by staff even if disallowed by ItemsDeniedRenewal','YesNo'),
47
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
48
('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'),
48
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
49
('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.',  'YesNo'),
49
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
50
('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.',  'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 212-217 Circulation: Link Here
212
                  1: Allow
212
                  1: Allow
213
                  0: "Don't allow"
213
                  0: "Don't allow"
214
            - staff to renew items that are on hold by manually specifying a due date.
214
            - staff to renew items that are on hold by manually specifying a due date.
215
        -
216
            - pref: AllowRenewalItemsDeniedOverride
217
              choices:
218
                  1: Allow
219
                  0: "Don't allow"
220
            - staff to renew items that should not be renewable because they have a match in ItemsDeniedRenewal.
215
        -
221
        -
216
            - pref: AllowItemsOnHoldCheckoutSIP
222
            - pref: AllowItemsOnHoldCheckoutSIP
217
              choices:
223
              choices:
(-)a/svc/renew (-2 / +1 lines)
Lines 69-75 my $override = Link Here
69
$override ||=
69
$override ||=
70
     $data->{error}
70
     $data->{error}
71
  && $data->{error} eq 'item_denied_renewal'
71
  && $data->{error} eq 'item_denied_renewal'
72
  && C4::Context->preference('AllowRenewalLimitOverride');
72
  && C4::Context->preference('AllowRenewalItemsDeniedOverride');
73
73
74
# If we're allowing reserved items to be renewed...
74
# If we're allowing reserved items to be renewed...
75
if ( $override ) {
75
if ( $override ) {
76
- 

Return to bug 22866