Bugzilla – Attachment 94826 Details for
Bug 18757
Problem when importing only items in MARC records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18757 - Problem when importing only items in MARC records
Bug-18757---Problem-when-importing-only-items-in-M.patch (text/plain), 2.06 KB, created by
Martin Renvoize (ashimema)
on 2019-10-29 11:19:04 UTC
(
hide
)
Description:
Bug 18757 - Problem when importing only items in MARC records
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-29 11:19:04 UTC
Size:
2.06 KB
patch
obsolete
>From b09b51b9b22889e43352380a965213ded9528a83 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 8 Jun 2017 16:22:55 +0200 >Subject: [PATCH] Bug 18757 - Problem when importing only items in MARC records > >When importing records with Stage MARC records for import, one can use matching rules to only import items into existing records. >Those imported items are stored as XML to be staged. > >The bug is that when MARC Flavour is UNIMARC the XML serialization fails because its is looking in field 100$a which does not exist. >You see in logs the error : Unsupported UNIMARC character encoding [] for XML output for UNIMARC; 100$a > >This patch adds the format "USMARC" to XML serialization, like in C4::Items::_get_unlinked_subfields_xml > >Test plan : >- On a UNIMARC database >- Define a maching rule on title 200$a >- Select a record with items >- Export it using : Save as > MARC (Unicode/UTF-8) >- Delete all items >- Go to Tools > Stage MARC records for import >- Upload exported file >- Select title matching rule >- Select "Ingore incoming record" in "Action if matching record found :" >- Select Yes and "Always add items" in "Check for embedded item record data?" >- Click Stage for import >=> Without patch you get the error >=> With patch the import is staged >- Import into the catalog and check item is well recreated > >Signed-off-by: Amandine Zocca <azocca@ville-montauban.fr> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/ImportBatch.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 8d39ed2034..7e252da83e 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -467,7 +467,7 @@ sub AddItemsToImportBiblio { > VALUES (?, ?, ?)"); > $sth->bind_param(1, $import_record_id); > $sth->bind_param(2, 'staged'); >- $sth->bind_param(3, $item_marc->as_xml()); >+ $sth->bind_param(3, $item_marc->as_xml("USMARC")); > $sth->execute(); > push @import_items_ids, $dbh->{'mysql_insertid'}; > $sth->finish(); >-- >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 18757
:
64104
|
93363
| 94826