@@ -, +, @@ --- Koha/Hold.pm | 2 +- .../mysql/atomicupdate/{bug_14364.perl => bug_14364.pl} | 6 +++--- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/circulation.pref | 2 +- t/db_dependent/Holds/ExpireReservesAutoFill.t | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) rename installer/data/mysql/atomicupdate/{bug_14364.perl => bug_14364.pl} (88%) --- a/Koha/Hold.pm +++ a/Koha/Hold.pm @@ -619,7 +619,7 @@ sub cancel { my $is_transfer = $self->branchcode ne $next_hold->{branchcode}; C4::Reserves::ModReserveAffect( $self->itemnumber, $self->borrowernumber, $is_transfer, $next_hold->{reserve_id}, $self->desk_id, $autofill_next ); - C4::Reserves::ModItemTransfer( $self->itemnumber, $self->branchcode, $next_hold->{branchcode}, "Reserve" ) if $is_transfer; + C4::Items::ModItemTransfer( $self->itemnumber, $self->branchcode, $next_hold->{branchcode}, "Reserve" ) if $is_transfer; } } --- a/installer/data/mysql/atomicupdate/bug_14364.perl +++ a/installer/data/mysql/atomicupdate/bug_14364.perl @@ -9,13 +9,13 @@ return { $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'), - ('ExpireReservesAutoFillEmail','', NULL,'. Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply to address','Free'); + ('ExpireReservesAutoFillEmail','', NULL,'. Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply-to address','Free'); }); say $out "Added ExpireReservesAutoFill system preferences"; $dbh->do(q{ INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type) - VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <> (<>) has changed to <> <> (<>). + VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled hold available for different patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <> (<>) has changed to <> <> (<>). Please update the hold information for this item. @@ -26,4 +26,4 @@ Pickup location: <>', 'email'); }); say $out "Added HOLD_CHANGED notice"; }, -} +}; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -208,7 +208,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'), ('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'), ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'), -('ExpireReservesAutoFillEmail','', NULL,'Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply to address','Free'), +('ExpireReservesAutoFillEmail','', NULL,'Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply-to address','Free'), ('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'), ('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'), ('ExpireReservesOnHolidays', '1', NULL, 'If false, reserves at a library will not be canceled on days the library is not open.', '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 @@ -747,7 +747,7 @@ Circulation: - automatically fill the next hold using the item. - Send email notification of the new hold filled with a canceled item to - pref: ExpireReservesAutoFillEmail - - . If no address is defined here, the email will be sent to the library's reply to address. + - . If no address is defined here, the email will be sent to the library's reply-to address. - '
NOTE: These system preferences require the misc/cronjobs/holds/cancel_expired_holds.pl cronjob. Ask your system administrator to schedule it.
' - - If using ExpireReservesMaxPickUpDelay, charge a patron who allows their waiting hold to expire a fee of --- a/t/db_dependent/Holds/ExpireReservesAutoFill.t +++ a/t/db_dependent/Holds/ExpireReservesAutoFill.t @@ -12,6 +12,7 @@ use MARC::Record; use C4::Context; use C4::Biblio; use C4::Items; +use C4::Reserves qw(CancelExpiredReserves); use Koha::Database; use Koha::Holds; @@ -176,7 +177,7 @@ subtest 'Test automatically canceled expired waiting holds to fill the next hold CancelExpiredReserves(); - my @holds = Koha::Holds->search( {}, { order_by => 'priority' } ); + my @holds = Koha::Holds->search( {}, { order_by => 'priority' } )->as_list; $hold_2 = $holds[0]; is( @holds, 1, 'Found 1 hold' ); --