Bugzilla – Attachment 141092 Details for
Bug 31644
MARCModification template fails to copy to/from subfield 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31644: Check if subfield defined, not for truth
Bug-31644-Check-if-subfield-defined-not-for-truth.patch (text/plain), 1.50 KB, created by
Nick Clemens (kidclamp)
on 2022-09-29 16:20:19 UTC
(
hide
)
Description:
Bug 31644: Check if subfield defined, not for truth
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-29 16:20:19 UTC
Size:
1.50 KB
patch
obsolete
>From 5ae29afdcb6761f753f80eade61015efbdf84e51 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 28 Sep 2022 18:53:28 +0000 >Subject: [PATCH] Bug 31644: Check if subfield defined, not for truth >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1 - Define a new MARC Modification template with actions: > Copy field 600$a to 942$0 >2 - Define a new record like: > LDR 00334nam a22001217a 4500 > 003 ff > 005 20201102111604.0 > 008 201102b xxu||||| |||| 00| 0 eng d > 040 _ _ â¡cvsd > 100 1 _ â¡012345â¡aKnuth, Donal Ervinâ¡d1938 > 245 _ _ â¡012345â¡aThe aty of computer programmingâ¡cDonald E. Knuth > 600 _ 0 â¡042â¡aComputer programmingâ¡9462 >3 - Modify this record using the template above >4 - Note that entire field is copied to 942 >5 - Apply patch >6 - Now only subfield 0 is copied >--- > Koha/SimpleMARC.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/SimpleMARC.pm b/Koha/SimpleMARC.pm >index 6fd08b1013..5aab1285d7 100644 >--- a/Koha/SimpleMARC.pm >+++ b/Koha/SimpleMARC.pm >@@ -92,9 +92,9 @@ sub copy_field { > if ( ! ( $record && $fromFieldName && $toFieldName ) ) { return; } > > >- if ( not $fromSubfieldName >+ if ( not defined $fromSubfieldName > or $fromSubfieldName eq '' >- or not $toSubfieldName >+ or not defined $toSubfieldName > or $toSubfieldName eq '' ) { > _copy_move_field( > { record => $record, >-- >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 31644
:
141066
|
141091
|
141092
|
141093
|
141936
|
141937
|
141938
|
142298
|
142299
|
142300
|
142301