Bugzilla – Attachment 100451 Details for
Bug 24620
Existing transfers not closed when hold is set to waiting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24620: Fix test, remove replaced code, use dt_from_string
Bug-24620-Fix-test-remove-replaced-code-use-dtfrom.patch (text/plain), 2.87 KB, created by
Nick Clemens (kidclamp)
on 2020-03-10 11:25:31 UTC
(
hide
)
Description:
Bug 24620: Fix test, remove replaced code, use dt_from_string
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-03-10 11:25:31 UTC
Size:
2.87 KB
patch
obsolete
>From e6ebf4e32952c0696d2f2c9b74c90d11e2c21ace Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 10 Mar 2020 07:12:07 -0400 >Subject: [PATCH] Bug 24620: Fix test, remove replaced code, use dt_from_string > >--- > C4/Reserves.pm | 5 +---- > t/db_dependent/Circulation.t | 15 ++++++++------- > 2 files changed, 9 insertions(+), 11 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 0771858f1a..b2c2c45c21 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1137,9 +1137,6 @@ sub ModReserveAffect { > $hold->itemnumber($itemnumber); > $hold->set_waiting($transferToDo); > >- _koha_notify_reserve( $hold->reserve_id ) >- if ( !$transferToDo && !$already_on_shelf ); >- > if( !$transferToDo ){ > _koha_notify_reserve( $hold->reserve_id ) unless $already_on_shelf; > my $transfers = Koha::Item::Transfers->search({ >@@ -1147,7 +1144,7 @@ sub ModReserveAffect { > datearrived => undef > }); > while( my $transfer = $transfers->next ){ >- $transfer->datearrived( DateTime->now( time_zone => C4::Context->tz() ) )->store; >+ $transfer->datearrived( dt_from_string() )->store; > }; > } > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 5638595399..57bb327f8e 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3749,8 +3749,8 @@ subtest 'Filling a hold should cancel existing transfer' => sub { > > t::lib::Mocks::mock_preference('AutomaticItemReturn', 1); > >- my $libraryA = $builder->build_object( { class => 'Koha::Libraries' } )->store; >- my $libraryB = $builder->build_object( { class => 'Koha::Libraries' } )->store; >+ my $libraryA = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $libraryB = $builder->build_object( { class => 'Koha::Libraries' } ); > my $patron = $builder->build_object( > { > class => 'Koha::Patrons', >@@ -3767,11 +3767,12 @@ subtest 'Filling a hold should cancel existing transfer' => sub { > > my ( undef, $message ) = AddReturn( $item->barcode, $libraryA->branchcode, undef, undef ); > is( Koha::Item::Transfers->search({ itemnumber => $item->itemnumber, datearrived => undef })->count, 1, "We generate a transfer on checkin"); >- AddReserve( >- $libraryA->branchcode, $patron->borrowernumber, $item->biblionumber, '', >- 1, undef, undef, '', >- undef, $item->itemnumber, undef, undef >- ); >+ AddReserve({ >+ branchcode => $libraryA->branchcode, >+ borrowernumber => $patron->borrowernumber, >+ biblionumber => $item->biblionumber, >+ itemnumber => $item->itemnumber >+ }); > my $reserves = Koha::Holds->search({ itemnumber => $item->itemnumber }); > is( $reserves->count, 1, "Reserve is placed"); > ( undef, $message ) = AddReturn( $item->barcode, $libraryA->branchcode, undef, undef ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24620
:
98678
|
98679
|
98711
|
98805
|
100448
|
100451
|
102914
|
102915
|
102916
|
104437