Bugzilla – Attachment 143348 Details for
Bug 31889
Insert 952 tags in correct order when embedding items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31889: (follow-up) Correct item order
Bug-31889-follow-up-Correct-item-order.patch (text/plain), 1.23 KB, created by
Marcel de Rooy
on 2022-11-07 09:49:10 UTC
(
hide
)
Description:
Bug 31889: (follow-up) Correct item order
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-11-07 09:49:10 UTC
Size:
1.23 KB
patch
obsolete
>From bcda4adee15364e184498443f14cd77085993b05 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 7 Nov 2022 09:42:21 +0000 >Subject: [PATCH] Bug 31889: (follow-up) Correct item order >Content-Type: text/plain; charset=utf-8 > >MARC::Record::insert_fields_ordered reverses the order of fields >with the same tag. So we need to reverse the input order here. > >This made Exporter/Record.t fail. > >Test plan: >Run t/db_dependent/Koha/Biblio/Metadata.t >Run t/db_dependent/Exporter/Record.t (should pass now) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Biblio/Metadata.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio/Metadata.pm b/Koha/Biblio/Metadata.pm >index 09291b2f8a..b6d532ea40 100644 >--- a/Koha/Biblio/Metadata.pm >+++ b/Koha/Biblio/Metadata.pm >@@ -172,7 +172,8 @@ sub _embed_items { > my $item_marc = C4::Items::GetMarcItem( $biblionumber, $itemnumber ); > push @item_fields, $item_marc->field($itemtag); > } >- $record->insert_fields_ordered(@item_fields); >+ $record->insert_fields_ordered( reverse @item_fields ); >+ # insert_fields_ordered with the reverse keeps 952s in right order > > } > else { >-- >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 31889
:
142254
|
142255
|
142256
|
142273
|
142274
|
142275
|
143035
|
143036
|
143037
| 143348 |
143350