Bugzilla – Attachment 37456 Details for
Bug 10906
Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally
PASSED-QA-Bug-10906---Reimported-records-into-Koha.patch (text/plain), 2.77 KB, created by
Kyle M Hall (khall)
on 2015-04-03 13:24:17 UTC
(
hide
)
Description:
[PASSED QA] Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-03 13:24:17 UTC
Size:
2.77 KB
patch
obsolete
>From fe394e6648b95d26f41535fbd0223116ec47f777 Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Mon, 23 Mar 2015 15:21:53 +0100 >Subject: [PATCH] [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> >--- > C4/ImportBatch.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 08304d7..fe31c45 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -623,7 +623,7 @@ sub BatchCommitRecords { > $recordid = $record_match; > my $oldxml; > if ($record_type eq 'biblio') { >- my ($count, $oldbiblio) = GetBiblio($recordid); >+ my $oldbiblio = GetBiblio($recordid); > $oldxml = GetXmlBiblio($recordid); > > # remove item fields so that they don't get >@@ -822,7 +822,7 @@ sub BatchRevertRecords { > my $old_record = MARC::Record->new_from_xml(StripNonXmlChars($rowref->{'marcxml_old'}), 'UTF-8', $rowref->{'encoding'}, $marc_type); > if ($record_type eq 'biblio') { > my $biblionumber = $rowref->{'matched_biblionumber'}; >- my ($count, $oldbiblio) = GetBiblio($biblionumber); >+ my $oldbiblio = GetBiblio($biblionumber); > $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); > ModBiblio($old_record, $biblionumber, $oldbiblio->{'frameworkcode'}); > } else { >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10906
:
37126
|
37442
| 37456