Summary: | importing from a UNIMARC backup will import biblio records but not items | ||
---|---|---|---|
Product: | Koha | Reporter: | Giuseppe Ciaccio <giuseppe.ciaccio> |
Component: | MARC Bibliographic record staging/import | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED INVALID | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P1 - high | CC: | fridolin.somers, giuseppe.ciaccio, jonathan.druart |
Version: | 18.11 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | a test backup containing 10 bibliorecords and 21 items (UNIMARC) |
Description
Giuseppe Ciaccio
2019-02-28 09:42:31 UTC
What is a backup in this context? I have exported the records then imported them in a fresh DB. I got: MARC staging results : Processing bibliographic records 1 records in file 0 records not staged because of MARC error 1 records staged Did not check for matches with existing records in catalog 5 item records found and staged then: MariaDB [koha_kohadev]> select count(*) from items; +----------+ | count(*) | +----------+ | 5 | +----------+ All looks good for me (items are displayed on the detail page of the bibliographic record). Tested with UNIMARC. (In reply to Giuseppe Ciaccio from comment #0) > So it seems that the UNIMARC item field is correctly fetched when importing > the backup in the stage area, but discarded when the staged records are > pushed in the catalog. I think I found why. The push to catalog is not allowed because the items have the same barcode which must be unique in catalog. Created attachment 86216 [details]
a test backup containing 10 bibliorecords and 21 items (UNIMARC)
Try with these records. On my koha installs (two ones at the moment, a 17.11 and a 18.11), importing this batch results into 10 records in the catalog but no items. The batch however contains 21 items, and these are visible in the record copies left in the stage area.
(In reply to Jonathan Druart from comment #1) > What is a backup in this context? Backup is: saving data away, and use them to restore a service after a catastrophic failure. In koha I would export records to a file, and import them again in case the original archive is lost. > I have exported the records then imported them in a fresh DB. > I got: > MARC staging results : > Processing bibliographic records > 1 records in file > 0 records not staged because of MARC error > 1 records staged > Did not check for matches with existing records in catalog > 5 item records found and staged > > then: > MariaDB [koha_kohadev]> select count(*) from items; > +----------+ > | count(*) | > +----------+ > | 5 | > +----------+ > > All looks good for me (items are displayed on the detail page of the > bibliographic record). > > Tested with UNIMARC. Could you also search the OPAC interface and see the items from there too? I tried the import of the UNIMARC batch now attached to this bugreport. From the admin interface, Home -> Tools -> Stage MARC records for import. Leaving all settings to default. Output is: MARC staging results : Processing bibliographic records 10 records in file 0 records not staged because of MARC error 10 records staged Did not check for matches with existing records in catalog 21 item records found and staged (consistent with the content of batch) Then I click on "Manage staged records" and, in the subsequent page, leave all settings to default and click on "Import this batch into the catalog". Output is: Completed import of records Number of records added 10 Number of records updated 0 Number of records ignored 0 Number of items added 0 Number of items replaced 0 Number of items ignored because of duplicate barcode 0 Clearly the items have been ignored; confirmed by searching the OPAC: it finds the biblio records but no items. (In reply to Fridolin SOMERS from comment #2) > (In reply to Giuseppe Ciaccio from comment #0) > > So it seems that the UNIMARC item field is correctly fetched when importing > > the backup in the stage area, but discarded when the staged records are > > pushed in the catalog. > > I think I found why. > The push to catalog is not allowed because the items have the same barcode > which must be unique in catalog. Ok it is not that. Does instances A and B have the same branches ? for items homebranch and holdingbranch (In reply to Fridolin SOMERS from comment #5) > (In reply to Fridolin SOMERS from comment #2) > > (In reply to Giuseppe Ciaccio from comment #0) > > > So it seems that the UNIMARC item field is correctly fetched when importing > > > the backup in the stage area, but discarded when the staged records are > > > pushed in the catalog. > > > > I think I found why. > > The push to catalog is not allowed because the items have the same barcode > > which must be unique in catalog. > > Ok it is not that. > Does instances A and B have the same branches ? > for items homebranch and holdingbranch Bingo! The two instances A and B have different branchcode and it seems that instance A refuses to import items whose branchcode does not match. Verified by manually editing subfields 995$b and 995$c -- replacing some of the original branchcodes with the one of instance A, then A will import only those items with matching branchcodes. |