Bugzilla – Attachment 149735 Details for
Bug 33329
GET /biblios encoding wrong when UNIMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33329: Correctly handle UNIMARC encoding for biblios
Bug-33329-Correctly-handle-UNIMARC-encoding-for-bi.patch (text/plain), 1.68 KB, created by
David Nind
on 2023-04-16 22:49:31 UTC
(
hide
)
Description:
Bug 33329: Correctly handle UNIMARC encoding for biblios
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-04-16 22:49:31 UTC
Size:
1.68 KB
patch
obsolete
>From d53e0249f935e168fe15e65442ea28002e710652 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 14 Apr 2023 17:21:15 -0300 >Subject: [PATCH] Bug 33329: Correctly handle UNIMARC encoding for biblios > >This patch introduces the same treatment we had for bug 32336, this time >for Koha::Objects::Record::Collections. > >To test: >1. Apply the regression tests patch >2. Run: > $ ktd --shell > k$ prove t/db_dependent/api/v1/biblios.t >=> FAIL: Tests fail! Encoding is wrong for UNIMARC! >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass! >5. Sign off :-D > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Objects/Record/Collections.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/Objects/Record/Collections.pm b/Koha/Objects/Record/Collections.pm >index 4be5b8e387..7874abae7f 100644 >--- a/Koha/Objects/Record/Collections.pm >+++ b/Koha/Objects/Record/Collections.pm >@@ -47,6 +47,7 @@ This class must always be subclassed. > =cut > > =head3 print_collection >+ > my $collection_text = $result_set->print_collection($format) > > Return a text representation of a collection (group of records) in the specified format. >@@ -83,7 +84,10 @@ sub print_collection { > $end = MARC::File::XML::footer(); > } > while ( my $element = $self->next ) { >- push @parts, $serializers{$format}->( $element->record ); >+ my $metadata = $element->metadata; >+ MARC::File::XML->default_record_format( $metadata->schema // C4::Context->preference("marcflavour") ) >+ if $format eq 'marcxml'; >+ push @parts, $serializers{$format}->( $metadata->record ); > } > return > ( defined $start ? $start : '' ) >-- >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 33329
:
148629
|
149708
|
149734
|
149735
|
150375
|
150376