@@ -, +, @@
---
Koha/Hold.pm | 2 +-
.../bug24194-add-DisableReserveExpiration-syspref.perl | 7 -------
.../bug24194-add-ReserveExpiration-syspref.perl | 7 +++++++
installer/data/mysql/mandatory/sysprefs.sql | 2 +-
.../prog/en/modules/admin/preferences/circulation.pref | 16 ++++++++--------
.../intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +-
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +-
misc/cronjobs/holds/cancel_expired_holds.pl | 2 +-
t/db_dependent/Hold.t | 6 +++---
t/db_dependent/Reserves.t | 8 ++++----
10 files changed, 27 insertions(+), 27 deletions(-)
delete mode 100644 installer/data/mysql/atomicupdate/bug24194-add-DisableReserveExpiration-syspref.perl
create mode 100644 installer/data/mysql/atomicupdate/bug24194-add-ReserveExpiration-syspref.perl
--- a/Koha/Hold.pm
+++ a/Koha/Hold.pm
@@ -187,7 +187,7 @@ sub set_waiting {
desk_id => $desk_id,
};
- if ( C4::Context->preference('DisableReserveExpiration') ){
+ if ( !C4::Context->preference('ReserveExpiration') ){
$values->{expirationdate} = undef;
} else {
my $requested_expiration;
--- a/installer/data/mysql/atomicupdate/bug24194-add-DisableReserveExpiration-syspref.perl
+++ a/installer/data/mysql/atomicupdate/bug24194-add-DisableReserveExpiration-syspref.perl
@@ -1,7 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
- $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ( "DisableReserveExpiration", 0, NULL, "Disable the use of expiration date in holds module.", "YesNo" ) });
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 24194 - DisableReserveExpiration system preference)\n";
-}
--- a/installer/data/mysql/atomicupdate/bug24194-add-ReserveExpiration-syspref.perl
+++ a/installer/data/mysql/atomicupdate/bug24194-add-ReserveExpiration-syspref.perl
@@ -0,0 +1,7 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ( "ReserveExpiration", 1, NULL, "Disable the use of expiration date in holds module.", "YesNo" ) });
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 24194 - ReserveExpiration system preference)\n";
+}
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ a/installer/data/mysql/mandatory/sysprefs.sql
@@ -165,7 +165,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('DefaultToLoggedInLibraryNoticesSlips', '0', NULL , 'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.', 'YesNo'),
('DefaultToLoggedInLibraryOverdueTriggers', '0', NULL , 'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.', 'YesNo'),
('CSVDelimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
-('DisableReserveExpiration', 0, NULL, 'Disable the use of expiration date in holds module.', 'YesNo'),
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding staff interface XSLT option must be on','Choice'),
('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
('displayFacetCount','0',NULL,NULL,'YesNo'),
@@ -558,6 +557,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'),
+('ReserveExpiration', 1, NULL, 'Disable the use of expiration date in holds module.', 'YesNo'),
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -726,18 +726,18 @@ Circulation:
- Mark a hold as problematic if it has been waiting for more than
- pref: ReservesMaxPickUpDelay
class: integer
- - "days.
NOTE: If DisableReserveExpiration is enabled, holds marked as problematic must be dealt with manually as they will never automatically expire."
+ - "days.
NOTE: If ReserveExpiration is disabled, holds marked as problematic must be dealt with manually as they will never automatically expire."
-
- pref: ExpireReservesMaxPickUpDelay
choices:
1: Allow
0: "Don't allow"
- - 'holds to expire automatically if they have not been picked by within the time period specified in the ReservesMaxPickUpDelay system preference.
NOTE: This system preference requires the misc/cronjobs/holds/cancel_expired_holds.pl
cronjob. Ask your system administrator to schedule it.
NOTE: This will not apply if DisableReserveExpiration is enabled.'
+ - 'holds to expire automatically if they have not been picked by within the time period specified in the ReservesMaxPickUpDelay system preference.
NOTE: This system preference requires the misc/cronjobs/holds/cancel_expired_holds.pl
cronjob. Ask your system administrator to schedule it.
NOTE: This will not apply if ReserveExpiration is disabled."'
-
- If using ExpireReservesMaxPickUpDelay, charge a patron who allows their waiting hold to expire a fee of
- pref: ExpireReservesMaxPickUpDelayCharge
class: currency
- - ".
NOTE: This will not apply if DisableReserveExpiration is enabled."
+ - ".
NOTE: This will not apply if ReserveExpiration is disabled."
-
- Satisfy holds using items from the libraries
- pref: StaticHoldsQueueWeight
@@ -819,7 +819,7 @@ Circulation:
choices:
1: Allow
0: "Don't allow"
- - expired holds to be canceled on days the library is closed.
NOTE: This will not apply if DisableReserveExpiration is enabled.
+ - expired holds to be canceled on days the library is closed.
NOTE: This will not apply if ReserveExpiration is disabled.
-
- pref: ExcludeHolidaysFromMaxPickUpDelay
choices:
@@ -896,11 +896,11 @@ Circulation:
type: textarea
syntax: text/x-yaml
-
- - pref: DisableReserveExpiration
+ - pref: ReserveExpiration
choices:
- yes: Disable
- no: "Don't disable"
- - the use of expiration dates in holds. This means patrons will not be able to specify a date when their hold is not needed, and any hold awaiting pickup will not automatically expire after it has been waiting for a problematic number of days. The expiration date will be hidden from both the OPAC and staff interface.
+ yes: Enable
+ no: "Disable"
+ - the use of expiration dates in holds. When enabled, patrons can specify a date when their hold is not needed, any hold awaiting pickup will automatically expire after it has been waiting for a problematic number of days, and expiration dates will show on both the OPAC and staff interface.
Interlibrary loans:
-
- pref: ILLModule
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -447,7 +447,7 @@
[% END %]
- [% UNLESS Koha.Preference('DisableReserveExpiration') %]
+ [% IF Koha.Preference('ReserveExpiration') %]