Bugzilla – Attachment 44849 Details for
Bug 14795
Batch record modification tool removes framework code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14795: Prevent modifying a record without using the original framework
Bug-14795-Prevent-modifying-a-record-without-using.patch (text/plain), 1.53 KB, created by
Jonathan Druart
on 2015-11-13 16:33:30 UTC
(
hide
)
Description:
Bug 14795: Prevent modifying a record without using the original framework
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-11-13 16:33:30 UTC
Size:
1.53 KB
patch
obsolete
>From 1b221b2ff1c66c373c2b35bb9a9c07db9924453c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 Nov 2015 16:30:32 +0000 >Subject: [PATCH] Bug 14795: Prevent modifying a record without using the > original framework > >The origin framework is not passed on modifying the records and so the >default one is used. >This can caused data lost. > >Test plan: >- Create a bibliographic record and specify a framework (not the default >one). >- Use the Batch records modification tools to modify it. >=> Without this patch, the default framework (framework code "") is used >and can deteriorate the record >=> With this patch, the record is saved using the original framework >--- > tools/batch_record_modification.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl >index 5b46823..f96ec5d 100755 >--- a/tools/batch_record_modification.pl >+++ b/tools/batch_record_modification.pl >@@ -191,7 +191,8 @@ if ( $op eq 'form' ) { > my $error = eval { > my $record = GetMarcBiblio( $biblionumber ); > ModifyRecordWithTemplate( $mmtid, $record ); >- ModBiblio( $record, $biblionumber ); >+ my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber ); >+ ModBiblio( $record, $biblionumber, $frameworkcode ); > }; > if ( $error and $error != 1 or $@ ) { # ModBiblio returns 1 if everything as gone well > push @messages, { >-- >2.1.0
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 14795
:
44849
|
44856
|
44868