From 7bb845b3a528ae185f5efb0fa8b64ba4f5405d8c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 17 Mar 2023 08:43:32 +0000 Subject: [PATCH] Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t Resolve: # Failed test 'Item's biblioitemnumber has not changed' # at t/db_dependent/ImportBatch.t line 407. # # got: '4261' # expected: '2371' Do not compare $item1->biblionumber with $original_biblioitemnumber :) Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit bf8e0a394fb1704345e8cc4cae45d86c31e596ef) Signed-off-by: Matt Blenkinsop --- C4/ImportBatch.pm | 2 +- t/db_dependent/ImportBatch.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index b073a2b188..5f276ace57 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -799,7 +799,7 @@ sub _batchCommitItems { $updsth->finish(); $num_items_replaced++; } elsif ( - # We aren't replacing, but the incoming file ahs a barcode, we need to check if it exists + # We aren't replacing, but the incoming file has a barcode, we need to check if it exists $duplicate_barcode && ( $item_match = Koha::Items->find({ barcode => $item->{'barcode'} }) ) ) { diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t index 74340b7ea8..c9ef54391a 100755 --- a/t/db_dependent/ImportBatch.t +++ b/t/db_dependent/ImportBatch.t @@ -404,7 +404,7 @@ subtest "Do not adjust biblionumber when replacing items during import" => sub { is( $import_item->import_error, undef, 'No error was reported' ); is( $item1->biblionumber, $original_biblionumber, "Item's biblionumber has not changed" ); - is( $item1->biblionumber, $original_biblioitemnumber, "Item's biblioitemnumber has not changed" ); + is( $item1->biblioitemnumber, $original_biblioitemnumber, "Item's biblioitemnumber has not changed" ); is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" ); }; -- 2.39.5