Bugzilla – Attachment 117602 Details for
Bug 24446
Stockrotation: Update to use daterequested in branchtransfers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24446: (QA follow-up) Fix ModItemTransfer tests
Bug-24446-QA-follow-up-Fix-ModItemTransfer-tests.patch (text/plain), 4.23 KB, created by
Jonathan Druart
on 2021-03-03 14:32:32 UTC
(
hide
)
Description:
Bug 24446: (QA follow-up) Fix ModItemTransfer tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:32:32 UTC
Size:
4.23 KB
patch
obsolete
>From 1b703aa65d38f88f65970c6fdfc0e6f9ae92b6d3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 21 Jan 2021 14:49:48 +0000 >Subject: [PATCH] Bug 24446: (QA follow-up) Fix ModItemTransfer tests >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Seems I missed passing trigger in the tests for ModItemTransfer. This >patch corrects that oversight. > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > t/db_dependent/Circulation.t | 3 ++- > t/db_dependent/Circulation/transfers.t | 19 +++++++++++++------ > t/db_dependent/ILSDI_Services.t | 2 +- > 3 files changed, 16 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index c82603de1b..d40e586e6b 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3420,6 +3420,7 @@ subtest 'Cancel transfers on lost items' => sub { > from_branch => $library_1->{branchcode}, > to_branch => $library_2->{branchcode}, > barcode => $item->barcode, >+ trigger => 'Reserve', > }); > my $hold = Koha::Holds->find( $reserve_id ); > is( $hold->found, 'T', 'Hold is in transit' ); >@@ -4682,7 +4683,7 @@ subtest 'Checkout should correctly terminate a transfer' => sub { > > my $do_transfer = 1; > ModItemTransfer( $item->itemnumber, $library_1->branchcode, >- $library_2->branchcode ); >+ $library_2->branchcode, 'Manual' ); > ModReserveAffect( $item->itemnumber, undef, $do_transfer, $reserve_id ); > GetOtherReserves( $item->itemnumber ) > ; # To put the Reason, it's what does returns.pl... >diff --git a/t/db_dependent/Circulation/transfers.t b/t/db_dependent/Circulation/transfers.t >index 215afad81a..7ad80f31d6 100755 >--- a/t/db_dependent/Circulation/transfers.t >+++ b/t/db_dependent/Circulation/transfers.t >@@ -111,10 +111,12 @@ my $item_id4 = Koha::Item->new( > )->store->itemnumber; > > #Add transfers >+my $trigger = 'Manual'; > ModItemTransfer( > $item_id1, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > > my $item_obj = Koha::Items->find({ itemnumber => $item_id1 }); >@@ -123,14 +125,16 @@ is( $item_obj->holdingbranch, $branchcode_1, "Item should be held at branch that > ModItemTransfer( > $item_id2, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > > # Add an "unsent" transfer for tests > ModItemTransfer( > $item_id3, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > my $transfer_requested = Koha::Item::Transfers->search( { itemnumber => $item_id3 }, { rows => 1 })->single; > $transfer_requested->set({ daterequested => dt_from_string, datesent => undef })->store; >@@ -139,7 +143,8 @@ $transfer_requested->set({ daterequested => dt_from_string, datesent => undef }) > ModItemTransfer( > $item_id4, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > my $transfer_cancelled = Koha::Item::Transfers->search( { itemnumber => $item_id4 }, { rows => 1 })->single; > $transfer_cancelled->set( { daterequested => dt_from_string, datesent => undef, datecancelled => dt_from_string } )->store; >@@ -239,13 +244,15 @@ $dbh->do("DELETE FROM branchtransfers"); > ModItemTransfer( > $item_id1, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > my $transfer = Koha::Item::Transfers->search()->next(); > ModItemTransfer( > $item_id1, > $branchcode_1, >- $branchcode_2 >+ $branchcode_2, >+ $trigger > ); > $transfer->{_result}->discard_changes; > ok( $transfer->datearrived, 'Date arrived is set when new transfer is initiated' ); >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 3818762e55..37fd3fbdfb 100755 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -643,7 +643,7 @@ subtest 'GetRecords' => sub { > } > }); > >- ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}); >+ ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}, 'Manual'); > > my $cgi = CGI->new; > $cgi->param(service => 'GetRecords'); >-- >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 24446
:
105943
|
105944
|
105945
|
107246
|
107247
|
107248
|
107249
|
107250
|
107252
|
107253
|
107254
|
107255
|
107256
|
107301
|
107302
|
107303
|
107304
|
107305
|
110280
|
110281
|
110282
|
110283
|
110533
|
110534
|
110535
|
110536
|
110537
|
110538
|
110539
|
110540
|
110541
|
110542
|
111322
|
116557
|
116558
|
116559
|
116560
|
116561
|
116562
|
116563
|
116564
|
116565
|
116566
|
116567
|
116568
|
116569
|
116570
|
117589
|
117590
|
117591
|
117592
|
117593
|
117594
|
117595
|
117596
|
117597
|
117598
|
117599
|
117600
|
117601
| 117602 |
117603
|
117604
|
117605
|
117606
|
117607
|
120116