Bug 9839 - when importing MARC records, item record not created even when set to "always add"
Summary: when importing MARC records, item record not created even when set to "always...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 19:52 UTC by Melia Meggs
Modified: 2014-05-26 21:04 UTC (History)
6 users (show)

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


Attachments
screenshot of no items added with item processing set to always add (61.84 KB, application/pdf)
2013-03-18 19:52 UTC, Melia Meggs
Details
Bug 9839 - when importing MARC records, item record not created even when set to "always add" (1.80 KB, patch)
2013-03-27 18:03 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PATCH][SIGNED OFF] Bug 9839 - when importing MARC records, item record not created even when set to "always add" (1.95 KB, patch)
2013-03-27 19:58 UTC, Mathieu Saby
Details | Diff | Splinter Review
Bug 9839 - when importing MARC records, item record not created even when set to "always add" (2.02 KB, patch)
2013-04-15 08:32 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Melia Meggs 2013-03-18 19:52:13 UTC
Created attachment 16308 [details]
screenshot of no items added with item processing set to always add

In 3.10.3, I am importing staged MARC records from Tools with these settings.

Matching rule: ISBN (020$a)
Action if matching record found: Ignore incoming record (its items may still be processed)
Action if no match found: Ignore incoming record (its items may still be processed)
Item processing: Always add items

When I import a matching record, zero items are added.  (See attached screenshot.)  I expected the items to be processed anyway.  Is this a bug?

If I change "Action if matching record found" to something other than "Ignore," then an item record is created in that case.
Comment 1 Kyle M Hall 2013-03-27 18:03:28 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-03-27 18:04:17 UTC
I'm sure there are other ways to test this, but this is the method I used.
Comment 3 Mathieu Saby 2013-03-27 19:57:56 UTC
I tested with unimarc record, following your test plan (except the items are stored in 995 and not in 952).
It works well.
This issue was very annoying for us! Thank you Kyle.

Mathieu Saby
Rennes 2 University
Comment 4 Mathieu Saby 2013-03-27 19:58:41 UTC Comment hidden (obsolete)
Comment 5 Frédéric Demians 2013-04-04 11:19:51 UTC
I confirm the bug, ad the solution.
Comment 6 Mason James 2013-04-15 08:32:45 UTC
Created attachment 17439 [details] [review]
Bug 9839 - when importing MARC records, item record not created even when set to "always add"

Test Plan:
1) Catalog a new record with an ISBN
2) Add some items to the record
3) Download the record as MARCXML
4) Delete the itemnumbers from the 952 fields in the record,
   Change the barcode fields to unused barcodes
5) Use xml2marc to save as a standard MARC file
6) Import the record using the 'Stage MARC for import' tool
   Use the settings:
       Record matching rule: ISBN
       Action if matching record found: ignore
       Action if no match found: ignore
       Item processing: always_add
       Check for embedded item record data?: Yes
       How to process items: Always add items
7) Import, note the bib is ignored, and the items are not processed
8) Undo import into catalog
8) Apply this patch
9) Import this batch into the catalog
10) Note the items were processed and are now added to the matching
record

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Tested with UNIMARC record. I followed the test plan, just changing 952 by 995
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 7 Mason James 2013-04-15 08:37:18 UTC
(In reply to comment #6)
> Created attachment 17439 [details] [review] [review]
> Bug 9839 - when importing MARC records, item record not created even when
> set to "always add"
> Signed-off-by: Mason James <mtj@kohaaloha.com>

patch looks good - passing QA on this patch...
Comment 8 Mason James 2013-04-15 08:39:38 UTC
> patch looks good - passing QA on this patch...

fyi: this bug should probably have its version updated from '3.10' to 'master'
Comment 9 Katrin Fischer 2013-04-15 16:14:04 UTC
Updating version as Mason suggested.
Comment 10 Jared Camins-Esakov 2013-04-21 13:57:28 UTC
This patch has been pushed to master and 3.12.x.
Comment 11 Chris Cormack 2013-04-27 05:44:03 UTC
Pushed to 3.10.x will be in 3.10.6