Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally
Summary: Reimported records into Koha are imported only as DEFAULT frameworks, not wha...
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 normal (vote)
Assignee: Jacek Ablewicz
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 11064 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-17 20:38 UTC by Cecil Hillyard
Modified: 2016-12-05 21:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally (2.39 KB, patch)
2015-03-23 14:59 UTC, Jacek Ablewicz
Details | Diff | Splinter Review
Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally (2.70 KB, patch)
2015-04-02 14:53 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally (2.77 KB, patch)
2015-04-03 13:24 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Cecil Hillyard 2013-09-17 20:38:02 UTC
Our bibliographic records have differing frameworks for the various formats.  We do NOT use the default framework. We then use MarcEdit to add all those nifty  RDA fields to our  records.

We catalog our records and then export them to MarcEdit.  MarcEdit does its stuff and then we reimport the records back into Koha.  This is where the problem lies.  They get reimported back into Koha with the DEFAULT framework.  

This did NOT happen when we were on 3.8 but it is happening now in 3.10 and it looks like it also happens in 3.12.   They match just fine on the control number but the framework changes.

This adds much time and  steps to our cataloging process.  Is this a bug or an enhancement request?  

I've been informed that this is how it is supposed to work.

Cecil Hillyard
Washoe County Library
Reno, Nevada
Comment 1 Nicole C. Engard 2013-10-16 21:43:24 UTC
I want to add to this that the problem is also a language issue - the text says "Add new bibliographic records into this framework" but the records in question aren't 'new' so that's where part of the confusion occurs
Comment 2 Jacek Ablewicz 2015-03-23 12:52:38 UTC
This is still broken in current master (but only when records are being matched & replaced when importing; for the records imported 'as new', framework choosen by the user seems to be saved and retained properly - ?).

Looks like some changes introduced by commit 82dc7b55a8b5a7642a906dcd8963952b7464adb1 ("Bug 4321: clean C4::Biblio::GetBiblio and uses") got inadvertantly reverted by next commmit (6e71b80ca39e6f1d2c31659a9a656de807ef3f32, "Bug 7475: Teach matching rules to handle authorities").

Another remaining place where GetBiblio() return results are wrongly assigned is serials/subscription-history.pl script.
Comment 3 Jacek Ablewicz 2015-03-23 14:59:11 UTC Comment hidden (obsolete)
Comment 4 M. Tompsett 2015-04-02 14:53:46 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2015-04-03 13:24:17 UTC
Created attachment 37456 [details] [review]
[PASSED QA] Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally

Existing framework code is currently not retained when local record
gets replaced during batch import, or when the restore/reverse function
is being used.

This patch fixes aforementioned issues by correcting outdated GetBiblio()
calls in C4/ImportBatch.pm

To test:

1/ try to replicate the issue: import some MARC records with
"Tools -> Stage MARC records for import" etc., using test setup,
matching rules and so on such that some existing records will get
replaced with imported ones
2/ observe that records replaced during import now open in the editor
with 'Default' framework, even if they have some other framework
set up previously
3/ apply patch
4/ redo 1/, confirming that this problem is no longer replicable
5/ try use 'restore' function with some freshly imported
records, ensure that original framework code got retained
in the records which had their imports reverted

NOTE: I confirmed this change by
1) git grep "=\s*GetBiblio\s*("
   -- this shows how GetBiblio is called elsewhere.
      It differed! So then...
2) vi C4/Biblio.pm
   /sub GetBiblio
   -- find the right one, notice it only returns a HASH ref,
      not an array.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2015-04-12 03:54:05 UTC
Patch pushed to master.

Thanks Jacek!
Comment 7 Chris Cormack 2015-04-20 10:09:01 UTC
Pushed to 3.18.x will be in 3.18.6
Comment 8 Jonathan Druart 2015-06-16 11:36:57 UTC
*** Bug 11064 has been marked as a duplicate of this bug. ***