Bugzilla – Attachment 147690 Details for
Bug 32804
Importing and replacing items causes inconsistency when itemnumber match and biblio match disagree
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32804: (follow-up) Test that id's have not changed
Bug-32804-follow-up-Test-that-ids-have-not-changed.patch (text/plain), 1.76 KB, created by
Nick Clemens (kidclamp)
on 2023-03-03 12:20:08 UTC
(
hide
)
Description:
Bug 32804: (follow-up) Test that id's have not changed
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-03 12:20:08 UTC
Size:
1.76 KB
patch
obsolete
>From 19233fe752b9d155357c3cfb7aa14cc1e403cb46 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 3 Mar 2023 12:18:40 +0000 >Subject: [PATCH] Bug 32804: (follow-up) Test that id's have not changed > >Rather than assuming biblionumber and biblioitemnumber are the same, we >should test that they have not changed form their original values >--- > t/db_dependent/ImportBatch.t | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t >index 704d4ac38a..74340b7ea8 100755 >--- a/t/db_dependent/ImportBatch.t >+++ b/t/db_dependent/ImportBatch.t >@@ -361,9 +361,11 @@ subtest "BatchCommitRecords overlay into framework" => sub { > }; > > subtest "Do not adjust biblionumber when replacing items during import" => sub { >- plan tests => 6; >+ plan tests => 7; > > my $item1 = $builder->build_sample_item; >+ my $original_biblionumber = $item1->biblionumber; >+ my $original_biblioitemnumber = $item1->biblioitemnumber; > my $item2 = $builder->build_sample_item; > > my $library = $builder->build_object({ class => 'Koha::Libraries' }); >@@ -401,7 +403,8 @@ subtest "Do not adjust biblionumber when replacing items during import" => sub { > is( $import_item->status, 'imported', 'Import was successful'); > is( $import_item->import_error, undef, 'No error was reported' ); > >- is( $item1->biblionumber, $item1->biblioitemnumber, "Item's biblionumber and biblioitemnumber match" ); >+ is( $item1->biblionumber, $original_biblionumber, "Item's biblionumber has not changed" ); >+ is( $item1->biblionumber, $original_biblioitemnumber, "Item's biblioitemnumber has not changed" ); > is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" ); > }; > >-- >2.30.2
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 32804
:
146034
|
146037
|
146292
|
146293
|
146345
|
146346
|
146579
|
147134
|
147135
|
147668
|
147669
|
147690
|
148314
|
148315
|
148316
|
148317
|
150363