Bugzilla – Attachment 173358 Details for
Bug 38271
Missing 008 field in bibliographic records created via EDIFACT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38271: (QA follow-up) Tidy code
Bug-38271-QA-follow-up-Tidy-code.patch (text/plain), 2.45 KB, created by
Kyle M Hall (khall)
on 2024-10-25 13:08:09 UTC
(
hide
)
Description:
Bug 38271: (QA follow-up) Tidy code
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-10-25 13:08:09 UTC
Size:
2.45 KB
patch
obsolete
>From adac6fc47334760c16c67b67209cf30c0795ebe5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 25 Oct 2024 09:06:11 -0400 >Subject: [PATCH] Bug 38271: (QA follow-up) Tidy code > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/EDI.pm | 6 +++--- > t/db_dependent/Koha/EDI.t | 14 +++++++------- > 2 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 4aeb1884d89..7b0eeb3657d 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -1221,14 +1221,14 @@ sub _create_item_from_quote { > } > > sub _handle_008_field { >- my ( $bib_record ) = @_; >+ my ($bib_record) = @_; > > if ( !$bib_record->field('008') ) { > my $default008 = biblio_008(); >- $bib_record->insert_fields_ordered( MARC::Field->new('008', $default008)); >+ $bib_record->insert_fields_ordered( MARC::Field->new( '008', $default008 ) ); > } > >- return $bib_record >+ return $bib_record; > } > > 1; >diff --git a/t/db_dependent/Koha/EDI.t b/t/db_dependent/Koha/EDI.t >index a82ad168b15..fe69c304e7f 100755 >--- a/t/db_dependent/Koha/EDI.t >+++ b/t/db_dependent/Koha/EDI.t >@@ -130,7 +130,7 @@ subtest '_handle_008_field' => sub { > > $schema->storage->txn_begin; > >- # Add our test quote file to the database for testing against >+ # Add our test quote file to the database for testing against > my $account = $builder->build( > { > source => 'VendorEdiAccount', >@@ -190,16 +190,16 @@ subtest '_handle_008_field' => sub { > > # Tests for generated basket for passed quote file > my $baskets = Koha::Acquisition::Baskets->search( { booksellerid => $account->{vendor_id} } ); >- my $basket = $baskets->next; >+ my $basket = $baskets->next; > > my $orders = $basket->orders; >- my $order = $orders->next; >+ my $order = $orders->next; > >- my $biblio = $order->biblio; >- my $record = $biblio->record; >+ my $biblio = $order->biblio; >+ my $record = $biblio->record; > my $record_field = $record->field('008'); > >- is(exists($record_field->{_data}), 1, 'Field has been added'); >+ is( exists( $record_field->{_data} ), 1, 'Field has been added' ); > > # Test without calling the 008 handler > $account = $builder->build( >@@ -288,4 +288,4 @@ subtest '_handle_008_field' => sub { > is( $record_field->{_data}, undef, 'Field has not been added' ); > > $schema->storage->txn_rollback; >-} >\ No newline at end of file >+ } >-- >2.39.5 (Apple Git-154)
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 38271
:
173347
|
173357
| 173358 |
173442
|
173490