Bugzilla – Attachment 161936 Details for
Bug 31224
Koha::Biblio::Metadata->record should use the EmbedItems filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31224: Convert C4::Record::marcrecord2csv
Bug-31224-Convert-C4Recordmarcrecord2csv.patch (text/plain), 1.31 KB, created by
Martin Renvoize (ashimema)
on 2024-02-08 16:53:37 UTC
(
hide
)
Description:
Bug 31224: Convert C4::Record::marcrecord2csv
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-02-08 16:53:37 UTC
Size:
1.31 KB
patch
obsolete
>From 060f6da7b5cc165a2a52ab10ad19f56b8e46e30b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 18 Oct 2022 16:25:35 +0100 >Subject: [PATCH] Bug 31224: Convert C4::Record::marcrecord2csv > >Update marcrecord2csv to user RecordProcessor directly for embedding >listed items. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Record.pm | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index 799499ec86e..81b5bd3a18d 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -462,10 +462,22 @@ sub marcrecord2csv { > my $biblio = Koha::Biblios->find($biblionumber); > return unless $biblio; > my $record = eval { >- $biblio->metadata->record( >- { embed_items => 1, itemnumbers => $itemnumbers } ); >+ $biblio->metadata->record; > }; > return unless $record; >+ >+ # Embed items >+ my $items = $biblio->items; >+ $items = $items->search( { itemnumber => { -in => $itemnumbers } } ) >+ if (@$itemnumber); >+ my $rp = Koha::RecordProcessor->new( >+ { >+ filters => ['EmbedItems'], >+ options => { items => $items } >+ } >+ ); >+ $rp->process($record); >+ > # Getting the framework > my $frameworkcode = $biblio->frameworkcode; > >-- >2.43.0
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 31224
:
138060
|
138061
|
138062
|
138063
|
138064
|
142137
|
142138
|
142139
|
142140
|
142141
|
142142
|
142143
|
161933
|
161934
|
161935
|
161936
|
161937
|
161938
|
161939
|
161940
|
161941
|
161942
|
161943
|
161944
|
173530
|
173531
|
173532
|
173533
|
173534
|
173535
|
173588
|
173597
|
173598
|
173636
|
173637
|
173638
|
173639
|
173640
|
173641
|
173642
|
173643
|
173644
|
174262
|
174263