Bugzilla – Attachment 174263 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: Revert to $metadata->record in `marcrecord2csv`
Bug-31224-Revert-to-metadata-record-in-marcrecord2.patch (text/plain), 1.58 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-11-08 00:36:54 UTC
(
hide
)
Description:
Bug 31224: Revert to $metadata->record in `marcrecord2csv`
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-11-08 00:36:54 UTC
Size:
1.58 KB
patch
obsolete
>From 5694a4958faa14dac09cc6dfa5814085fd1f2ebe Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 7 Nov 2024 21:29:54 -0300 >Subject: [PATCH] Bug 31224: Revert to $metadata->record in `marcrecord2csv` > >This patch reverts the change for marcrecord2csv as >`$biblio->metadata_record` doesn't support a list of itemnumbers, and it >feels we should discuss in another context whether to add it as a >parameter, or make it a Koha::Items iterator. The Koha::Item object is >actually retrieved in marc2csv so there's room for easy improvements >without adding technical debt (i.e. bad method signatures for a single >use case). > >This fixes a feature: > >1. Run: > $ ktd --shell > k$ prove t/db_dependent/Exporter/Record.t >=> FAIL: Test fails because the 'items' are not being filtered on the >passed itemnumbers (i.e. all items are picked for generating the CSV). >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Record.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index 15978a5b2be..69297006011 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -461,7 +461,7 @@ sub marcrecord2csv { > # Getting the record > my $biblio = Koha::Biblios->find($biblionumber); > return unless $biblio; >- my $record = eval { $biblio->metadata_record( { embed_items => 1, itemnumbers => $itemnumbers } ); }; >+ my $record = eval { $biblio->metadata->record( { embed_items => 1, itemnumbers => $itemnumbers } ); }; > return unless $record; > > # Getting the framework >-- >2.47.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