Bugzilla – Attachment 97695 Details for
Bug 24480
Fields added with MARC modifications templates are not added in an ordered way
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24480: Fix insert_fields_ordered instead of append_fields in SimpleMARC
Bug-24480-Fix-insertfieldsordered-instead-of-appen.patch (text/plain), 1.39 KB, created by
Arthur Suzuki
on 2020-01-22 09:54:26 UTC
(
hide
)
Description:
Bug 24480: Fix insert_fields_ordered instead of append_fields in SimpleMARC
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2020-01-22 09:54:26 UTC
Size:
1.39 KB
patch
obsolete
>From 07e28a8348636a5ab7c3819b34607490ea2d9fe8 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Fri, 17 Jan 2020 10:26:58 +0100 >Subject: [PATCH] Bug 24480: Fix insert_fields_ordered instead of append_fields > in SimpleMARC > >Test plan : > - create a marc modification template which add a new field to a record > - apply that template to some records > - verify that the new field is always appended at the bottom of the record, even if some fields are higher. > - apply patch > - apply template to another set of records > - verify the added field is now ordered within the already existing fields in the records >--- > Koha/SimpleMARC.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/SimpleMARC.pm b/Koha/SimpleMARC.pm >index 5a916bdb03..0cf8621f02 100644 >--- a/Koha/SimpleMARC.pm >+++ b/Koha/SimpleMARC.pm >@@ -202,12 +202,12 @@ sub add_field { > if ( $fieldName > 10 ) { > foreach my $value ( @values ) { > my $field = MARC::Field->new( $fieldName, '', '', "$subfieldName" => $value ); >- $record->append_fields( $field ); >+ $record->insert_fields_ordered( $field ); > } > } else { > foreach my $value ( @values ) { > my $field = MARC::Field->new( $fieldName, $value ); >- $record->append_fields( $field ); >+ $record->insert_fields_ordered( $field ); > } > } > } >-- >2.20.1
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 24480
:
97695
|
97944
|
97945
|
98975
|
98976
|
106621
|
112311
|
112312
|
150665
|
150666
|
155714
|
155715
|
155716
|
155717
|
155721
|
155722
|
155723
|
155724
|
158130
|
158131
|
158132
|
158133