@@ -, +, @@
and more
- change syspref description to say 'holds' instead of reserves
- clarify descriptions of related sysprefs
- hide expiration column on reserves page
- move syspref to 'hold policy' section
- fix cancel_expired_holds.pl cron to consider syspref
- set expirationdate to undef always
---
C4/Reserves.pm | 29 +++++++---------------
...24194-add-DisableReserveExpiration-syspref.perl | 2 +-
installer/data/mysql/mandatory/sysprefs.sql | 2 +-
.../en/modules/admin/preferences/circulation.pref | 20 +++++++--------
.../prog/en/modules/reserve/request.tt | 2 +-
misc/cronjobs/holds/cancel_expired_holds.pl | 4 ++-
t/db_dependent/Reserves.t | 2 +-
7 files changed, 26 insertions(+), 35 deletions(-)
--- a/C4/Reserves.pm
+++ a/C4/Reserves.pm
@@ -2048,26 +2048,15 @@ sub RevertWaitingStatus {
->update({ priority => \'priority + 1' }, { no_triggers => 1 });
## Fix up the currently waiting reserve
- if ( C4::Context->preference('DisableReserveExpiration') ){
- $hold->set(
- {
- priority => 1,
- found => undef,
- waitingdate => undef,
- expirationdate => undef,
- itemnumber => $hold->item_level_hold ? $hold->itemnumber : undef,
- }
- )->store();
- } else {
- $hold->set(
- {
- priority => 1,
- found => undef,
- waitingdate => undef,
- itemnumber => $hold->item_level_hold ? $hold->itemnumber : undef,
- }
- )->store();
- }
+ $hold->set(
+ {
+ priority => 1,
+ found => undef,
+ waitingdate => undef,
+ expirationdate => undef,
+ itemnumber => $hold->item_level_hold ? $hold->itemnumber : undef,
+ }
+ )->store();
_FixPriority( { biblionumber => $hold->biblionumber } );
--- a/installer/data/mysql/atomicupdate/bug24194-add-DisableReserveExpiration-syspref.perl
+++ a/installer/data/mysql/atomicupdate/bug24194-add-DisableReserveExpiration-syspref.perl
@@ -1,6 +1,6 @@
$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 reserves module.", "YesNo" ) });
+ $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/mandatory/sysprefs.sql
+++ a/installer/data/mysql/mandatory/sysprefs.sql
@@ -163,7 +163,7 @@ 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'),
('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
-('DisableReserveExpiration', 0, NULL, 'Disable the use of expiration date in reserves module.', 'YesNo'),
+('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'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -168,12 +168,6 @@ Circulation:
yes: "Use"
no: "Don't use"
- circulation desks with circulation.
- -
- - pref: DisableReserveExpiration
- choices:
- yes: Disable
- no: "Don't disable"
- - the use of expiration dates in reserves.
Checkout policy:
-
@@ -718,18 +712,18 @@ Circulation:
- Mark a hold as problematic if it has been waiting for more than
- pref: ReservesMaxPickUpDelay
class: integer
- - days.
+ - "days.
NOTE: If DisableReserveExpiration is enabled, holds marked as problematic must be dealt with manually as they will never automatically expire."
-
- pref: ExpireReservesMaxPickUpDelay
choices:
yes: Allow
no: "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."
+ - "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."
-
- 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."
-
- Satisfy holds using items from the libraries
- pref: StaticHoldsQueueWeight
@@ -811,7 +805,7 @@ Circulation:
choices:
yes: Allow
no: "Don't allow"
- - expired holds to be canceled on days the library is closed.
+ - expired holds to be canceled on days the library is closed.
NOTE: This will not apply if DisableReserveExpiration is enabled.
-
- pref: ExcludeHolidaysFromMaxPickUpDelay
choices:
@@ -885,6 +879,12 @@ Circulation:
- pref: UpdateItemWhenLostFromHoldList
type: textarea
syntax: text/x-yaml
+ -
+ - pref: DisableReserveExpiration
+ 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.
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
@@ -445,7 +445,7 @@
[% END %]
- [% IF !Koha.Preference('DisableReserveExpiration') %]
+ [% UNLESS Koha.Preference('DisableReserveExpiration') %]