From 48a5514a9342404d7f7f9d1fcae1c9eaa8f5a3fa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 13 Nov 2015 16:30:32 +0000 Subject: [PATCH] Bug 14795: Prevent modifying a record without using the original framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Bernardo Gonzalez Kriegel Tested framework is lost using tool without patch Problem gone with patch No qa errors Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit c1aeaf62b9c08d35449aa9822504de8ce79fec62) Signed-off-by: Frédéric Demians --- 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 f275088533..a1bde0f9d7 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -192,7 +192,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.39.5