Bug 23033 - C4::Items::AddItemBatchFromMarc does not queue bib record for indexing
Summary: C4::Items::AddItemBatchFromMarc does not queue bib record for indexing
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: 18.05
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-03 14:31 UTC by Paul Hoffman
Modified: 2024-02-05 10:36 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Hoffman 2019-06-03 14:31:18 UTC
Callers of C4::Items::AddItemBatchFromMarc must call ModZebra (directly or indirectly) afterwards, which strikes me as wrong.

AddItemBatchFromMarc used to call C4::Biblio::ModBiblioMarc, which calls C4::Items::ModZebra[*] but the call to ModBiblioMarc was commented out in commit 3584c442 (2010-09-03 12:16:52 +0200, see bug #5579) and the comment was never removed.

The only code in Koha 18.11 that calls AddItemBatchFromMarc is in migration_tools/bulkmarcimport.pl, which dutifully calls MobBiblioMarc once after each call to AddItemBatchFromMarc -- even(!) if AddItemBatchFromMarc fails, which seems weird but I don't fully understand the code.  We could add a call to ModZebra in AddItemBatchFromMarc but I assume it would be better to reinstate the call to ModBiblioMarc.

I'll attach a patch shortly.

[*] C4::Items gets ModZebra from C4::Biblio, which implements and exports it, so my will also change this to a call to C4::Biblio::ModZebra.