Bugzilla – Attachment 102916 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.95 KB, created by
Jonathan Druart
on 2020-04-14 09:49:21 UTC
(
hide
)
Description:
Bug 24620: Fix test, remove replaced code, use dt_from_string
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-14 09:49:21 UTC
Size:
2.95 KB
patch
obsolete
>From 1d2a50d0faeccef921113a5917657728b0eaf8ea 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 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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 6547817fab..752d63038a 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1139,9 +1139,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({ >@@ -1149,7 +1146,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 1ca01ea6f8..7ae3b9f694 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3820,8 +3820,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', >@@ -3838,11 +3838,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.20.1
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