Bugzilla – Attachment 100993 Details for
Bug 24900
Fix 'MARC modification templates' to not assume that 'from field' will match 'conditional field'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24900: If condition in template, check for existence of from fields in MARC record
Bug-24900-If-condition-in-template-check-for-exist.patch (text/plain), 1.56 KB, created by
Aleisha Amohia
on 2020-03-19 04:55:10 UTC
(
hide
)
Description:
Bug 24900: If condition in template, check for existence of from fields in MARC record
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2020-03-19 04:55:10 UTC
Size:
1.56 KB
patch
obsolete
>From e14c79d37c104dd9326bfcdfdf496d56ae284610 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 19 Mar 2020 04:37:34 +0000 >Subject: [PATCH] Bug 24900: If condition in template, check for existence of > from fields in MARC record > >This patch checks the existence of 'from fields' in the record, as >defined in the template, if the template includes a condition. > >To test: >Follow plan to reproduce the bug >Apply the patch and go back to import the record (Tools -> Stage MARC record for import) >Under Use MARC modification template, select your template to modify the record >Stage for import >Once complete, go to Manage staged records >Click the staged record to view the MARC >Confirm all 020 fields were deleted, as expected > >Sponsored-by: Catalyst IT >--- > C4/MarcModificationTemplates.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/C4/MarcModificationTemplates.pm b/C4/MarcModificationTemplates.pm >index 54846e5..219c518 100644 >--- a/C4/MarcModificationTemplates.pm >+++ b/C4/MarcModificationTemplates.pm >@@ -601,6 +601,12 @@ sub ModifyRecordWithTemplate { > if ( $field_number == 1 ) { > # We want only the first matching > $field_numbers = [ $field_numbers->[0] ]; >+ } else { >+ $field_numbers = field_exists({ >+ record => $record, >+ field => $from_field, >+ subfield => $from_subfield, >+ }); > } > } > # There was no condition >-- >2.1.4
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 24900
:
100992
|
100993
|
101665
|
101666
|
101970
|
102121