Bug 40671: Update method calls from revert_waiting to revert_found
This patch updates all existing calls to the renamed method throughout
the codebase to maintain compatibility.
Changes:
* Updated C4::Circulation calls to use revert_found()
* Updated C4::Reserves calls to use revert_found()
* Updated test files to use revert_found()
* Maintained all existing functionality and behavior
All existing functionality is preserved - this is purely a method
name change to reflect the expanded capability.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4ad2c94690)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
894e17f031
commit
6cc8135ad1
|
|
@ -2568,7 +2568,7 @@ sub AddReturn {
|
|||
|
||||
# if a hold is found and is waiting at another branch, change the priority back to 1 and trigger the hold (this will trigger a transfer and update the hold status properly)
|
||||
if ( $resfound and $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) {
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
$resfound = 'Reserved';
|
||||
$resrec = $hold->unblessed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2085,7 +2085,7 @@ sub MoveReserve {
|
|||
|
||||
$hold = Koha::Holds->find( $res->{reserve_id} );
|
||||
if ( $cancelreserve eq 'revert' ) {
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
} elsif ( $cancelreserve eq 'cancel' || $cancelreserve ) { # cancel reserves on this item
|
||||
$hold->cancel;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ if ( $op eq 'cud-move' ) {
|
|||
my $hold_itemnumber = $input->param('itemnumber');
|
||||
if ( $prev_priority == 0 && $next_priority == 1 ) {
|
||||
my $hold = Koha::Holds->find($reserve_id);
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
} else {
|
||||
AlterPriority(
|
||||
$where, $reserve_id, $prev_priority,
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ subtest "store() tests" => sub {
|
|||
$hold->discard_changes;
|
||||
|
||||
$hold->set_waiting;
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
$hold->discard_changes;
|
||||
|
||||
$expected_date = dt_from_string( $hold->reservedate )->add( years => 2 )->ymd;
|
||||
|
|
@ -283,7 +283,7 @@ subtest "store() tests" => sub {
|
|||
$hold->discard_changes;
|
||||
|
||||
$hold->set_waiting;
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
$hold->discard_changes;
|
||||
|
||||
is(
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ subtest 'set_waiting+patron_expiration_date' => sub {
|
|||
is( $hold->expirationdate, $patron_expiration_date );
|
||||
is( $hold->patron_expiration_date, $patron_expiration_date );
|
||||
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
|
||||
$hold = $hold->get_from_storage;
|
||||
is( $hold->expirationdate, $patron_expiration_date );
|
||||
|
|
@ -1033,7 +1033,7 @@ subtest 'set_waiting+patron_expiration_date' => sub {
|
|||
is( $hold->expirationdate, $new_expiration_date );
|
||||
is( $hold->patron_expiration_date, $patron_expiration_date );
|
||||
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
|
||||
$hold = $hold->get_from_storage;
|
||||
is( $hold->expirationdate, $patron_expiration_date );
|
||||
|
|
|
|||
|
|
@ -1105,7 +1105,7 @@ subtest 'MoveReserve additional test' => sub {
|
|||
};
|
||||
|
||||
# FIXME: Should be in Circulation.t
|
||||
subtest 'AddIssue calls $hold->revert_waiting()' => sub {
|
||||
subtest 'AddIssue calls $hold->revert_found()' => sub {
|
||||
|
||||
plan tests => 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -1119,7 +1119,7 @@ subtest do_checkout_with_holds => sub {
|
|||
|
||||
# Test non-attached holds
|
||||
$hold->set_waiting();
|
||||
$hold->revert_waiting();
|
||||
$hold->revert_found();
|
||||
t::lib::Mocks::mock_preference( 'AllowItemsOnHoldCheckoutSIP', '0' );
|
||||
$co_transaction->do_checkout();
|
||||
is( $patron->checkouts->count, 0, 'Checkout refused due to hold and AllowItemsOnHoldCheckoutSIP' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue