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

--- Comment #5 from David Gustafsson <glask...@gmail.com> ---
Have now investigated this further, and as far as I'm concerned it it a bit of
a mess.

- When a record is inserted, the AddBiblio is called, which do not call
"_strip_item_fields" (more on this later). AddItemBatchFromMarc is later
called, and the items contained in the imported marc record are created.

- If the import is run a second time, and if the record is correctly matched
with the previously created one, ModBiblio is called instead. Inside of
ModBiblio _strip_item_fields is called (this is important). When
"AddItemBatchFromMarc" is later called, the items have been stripped, so they
are never again processed (as far as I understand it). If you remove the
(holdings) items in Koha, and run the import again, still no items. I'm working
with a modified script, so I will have to verify this behaviour with the
original. But seems odd to me.

ModBiblioMarc is also called unnecessarily for updated items (it has already
been called in ModBiblio). So this invocation should be done a in different
logical branch for new records insertion.

So to sum things up, if I have understood the code correctly:

- Right now, items are ever only created on insert (and the deduplication logic
is only used here, does not apply for updates).

- This should be separated into a separate logical branch, and not called also
for updates (since it is bad for performance, and very confusing if trying to
understand the code).

Besides, nowhere is the items inserted back into the marcxml. I don't know if
this is by design, but could be a possible bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to