[Koha-bugs] [Bug 18757] Problem when importing only items in MARC records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 29 12:19:04 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18757

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93363|0                           |1
        is obsolete|                            |

--- Comment #12 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 94826
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94826&action=edit
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 at ville-montauban.fr>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list