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

(-)a/circ/pendingreserves.pl (-2 / +3 lines)
Lines 68-75 my ( $year, $month, $day ) = Today(); Link Here
68
my $todaysdate     = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day);
68
my $todaysdate     = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day);
69
my $yesterdaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day,   0, 0, -1));
69
my $yesterdaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day,   0, 0, -1));
70
# changed from delivered range of 10 years-yesterday to 2 days ago-today
70
# changed from delivered range of 10 years-yesterday to 2 days ago-today
71
# Find two days ago for the default shelf pull start and end dates
71
# Find two days ago for the default shelf pull start and end dates, unless HoldsToPullStartDate sys pref is set.
72
my $pastdate       = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, -2));
72
my $defaultstartdate = ( C4::Context->preference('HoldsToPullStartDate') ) ? "-".C4::Context->preference('HoldsToPullStartDate') : -2;
73
my $pastdate       = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, $defaultstartdate));
73
74
74
# Predefine the start and end dates if they are not already defined
75
# Predefine the start and end dates if they are not already defined
75
$startdate =~ s/^\s+//;
76
$startdate =~ s/^\s+//;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 371-373 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
371
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToUseWhenPrefill','','Define a list of subfields to use when prefilling items (separated by space)','','Free');
371
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SubfieldsToUseWhenPrefill','','Define a list of subfields to use when prefilling items (separated by space)','','Free');
372
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionMarker','','Markers for age restriction indication, e.g. FSK|PEGI|Age|',NULL,'free');
372
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionMarker','','Markers for age restriction indication, e.g. FSK|PEGI|Age|',NULL,'free');
373
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionOverride',0,'Allow staff to check out an item with age restriction.',NULL,'YesNo');
373
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AgeRestrictionOverride',0,'Allow staff to check out an item with age restriction.',NULL,'YesNo');
374
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 5696-5701 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
5696
    SetVersion($DBversion);
5696
    SetVersion($DBversion);
5697
}
5697
}
5698
5698
5699
$DBversion = "XXX";
5700
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5701
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer')");
5702
    print "Upgrade to $DBversion done (Added HoldsToPullStartDate syspref)\n";
5703
    SetVersion($DBversion);
5704
}
5705
5699
=head1 FUNCTIONS
5706
=head1 FUNCTIONS
5700
5707
5701
=head2 TableExists($table)
5708
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +5 lines)
Lines 52-57 Circulation: Link Here
52
                  no: "Don't allow"
52
                  no: "Don't allow"
53
            - staff to specify a due date for a checkout.
53
            - staff to specify a due date for a checkout.
54
        -
54
        -
55
            - Set the default start date for the Holds to pull list to
56
            - pref: HoldsToPullStartDate
57
              class: integer
58
            - ago.
59
        -
55
            - pref: AllowAllMessageDeletion
60
            - pref: AllowAllMessageDeletion
56
              choices:
61
              choices:
57
                  yes: Allow
62
                  yes: Allow
58
- 

Return to bug 8585