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

(-)a/Koha/Hold.pm (-1 / +1 lines)
Lines 640-646 sub cancel { Link Here
640
            my $is_transfer = $self->branchcode ne $next_hold->{branchcode};
640
            my $is_transfer = $self->branchcode ne $next_hold->{branchcode};
641
641
642
            C4::Reserves::ModReserveAffect( $self->itemnumber, $self->borrowernumber, $is_transfer, $next_hold->{reserve_id}, $self->desk_id, $autofill_next );
642
            C4::Reserves::ModReserveAffect( $self->itemnumber, $self->borrowernumber, $is_transfer, $next_hold->{reserve_id}, $self->desk_id, $autofill_next );
643
            C4::Reserves::ModItemTransfer( $self->itemnumber, $self->branchcode, $next_hold->{branchcode}, "Reserve" ) if $is_transfer;
643
            C4::Items::ModItemTransfer( $self->itemnumber, $self->branchcode, $next_hold->{branchcode}, "Reserve" ) if $is_transfer;
644
        }
644
        }
645
    }
645
    }
646
646
(-)a/installer/data/mysql/atomicupdate/bug_14364.perl (-3 / +3 lines)
Lines 9-21 return { Link Here
9
        $dbh->do(q{
9
        $dbh->do(q{
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
11
            ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
12
            ('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');
12
            ('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');
13
        });
13
        });
14
        say $out "Added ExpireReservesAutoFill system preferences";
14
        say $out "Added ExpireReservesAutoFill system preferences";
15
15
16
        $dbh->do(q{
16
        $dbh->do(q{
17
        INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
17
        INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
18
        VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled Hold Available for Different Patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
18
        VALUES ( 'reserves', 'HOLD_CHANGED', '', 'Canceled hold available for different patron', '0', 'Canceled Hold Available for Different Patron', 'The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>).
19
19
20
Please update the hold information for this item.
20
Please update the hold information for this item.
21
21
Lines 26-29 Pickup location: <<branches.branchname>>', 'email'); Link Here
26
        });
26
        });
27
        say $out "Added HOLD_CHANGED notice";
27
        say $out "Added HOLD_CHANGED notice";
28
    },
28
    },
29
}
29
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 215-221 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
215
('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'),
215
('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'),
216
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
216
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
217
('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
217
('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
218
('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'),
218
('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'),
219
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
219
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
220
('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'),
220
('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'),
221
('ExpireReservesOnHolidays', '1', NULL, 'If false, reserves at a library will not be canceled on days the library is not open.', 'YesNo'),
221
('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 (-1 / +1 lines)
Lines 770-776 Circulation: Link Here
770
            - automatically fill the next hold using the item.
770
            - automatically fill the next hold using the item.
771
            - Send email notification of the new hold filled with a canceled item to
771
            - Send email notification of the new hold filled with a canceled item to
772
            - pref: ExpireReservesAutoFillEmail
772
            - pref: ExpireReservesAutoFillEmail
773
            - . If no address is defined here, the email will be sent to the library's reply to address.
773
            - . If no address is defined here, the email will be sent to the library's reply-to address.
774
            - '<br><strong>NOTE:</strong> These system preferences require the <code>misc/cronjobs/holds/cancel_expired_holds.pl</code> cronjob. Ask your system administrator to schedule it.<br>'
774
            - '<br><strong>NOTE:</strong> These system preferences require the <code>misc/cronjobs/holds/cancel_expired_holds.pl</code> cronjob. Ask your system administrator to schedule it.<br>'
775
        -
775
        -
776
            - If using <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExpireReservesMaxPickUpDelay">ExpireReservesMaxPickUpDelay</a>, charge a patron who allows their waiting hold to expire a fee of
776
            - If using <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExpireReservesMaxPickUpDelay">ExpireReservesMaxPickUpDelay</a>, charge a patron who allows their waiting hold to expire a fee of
(-)a/t/db_dependent/Holds/ExpireReservesAutoFill.t (-2 / +2 lines)
Lines 12-17 use MARC::Record; Link Here
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio;
13
use C4::Biblio;
14
use C4::Items;
14
use C4::Items;
15
use C4::Reserves qw(CancelExpiredReserves);
15
use Koha::Database;
16
use Koha::Database;
16
use Koha::Holds;
17
use Koha::Holds;
17
18
Lines 176-182 subtest 'Test automatically canceled expired waiting holds to fill the next hold Link Here
176
177
177
    CancelExpiredReserves();
178
    CancelExpiredReserves();
178
179
179
    my @holds = Koha::Holds->search( {}, { order_by => 'priority' } );
180
    my @holds = Koha::Holds->search( {}, { order_by => 'priority' } )->as_list;
180
    $hold_2 = $holds[0];
181
    $hold_2 = $holds[0];
181
182
182
    is( @holds,            1,   'Found 1 hold' );
183
    is( @holds,            1,   'Found 1 hold' );
183
- 

Return to bug 14364