@@ -, +, @@ --- cataloguing/addbiblio.pl | 2 +- ...18138-edit-biblio-marc-modification-template-syspref.sql | 2 +- .../prog/en/modules/admin/preferences/cataloguing.pref | 2 +- svc/bib | 2 +- .../www/EditBiblioMarcModificationTemplatePreference.t | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -860,7 +860,7 @@ if ( $op eq "addbiblio" ) { # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) if ( !$duplicatebiblionumber or $confirm_not_duplicate ) { my $oldbibitemnum; - my $marc_modification_template_name = C4::Context->preference("EditBiblioMarcModificationTemplate"); + my $marc_modification_template_name = C4::Context->preference("SaveBiblioMarcModificationTemplate"); if ($marc_modification_template_name) { my $template = firstval { $_->{'name'} eq $marc_modification_template_name } GetModificationTemplates(); if ($template) { --- a/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_18138-edit-biblio-marc-modification-template-syspref.sql @@ -1, +1, @@ -INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('EditBiblioMarcModificationTemplate', '', '', 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'Free'); +INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('SaveBiblioMarcModificationTemplate', '', '', 'MARC modification template applied when saving bibliographic record in staff client or HTTP API', 'Free'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -160,7 +160,7 @@ Cataloging: - ".
NOTE: Use a dollar sign between field and subfield like 123$a." - - Apply the MARC modification template with name - - pref: EditBiblioMarcModificationTemplate + - pref: SaveBiblioMarcModificationTemplate class: short - on records saved using the staff client simple MARC editor, advanced editor or HTTP API. Display: --- a/svc/bib +++ a/svc/bib @@ -116,7 +116,7 @@ sub update_bib { } } - my $marc_modification_template_name = C4::Context->preference("EditBiblioMarcModificationTemplate"); + my $marc_modification_template_name = C4::Context->preference("SaveBiblioMarcModificationTemplate"); if ($marc_modification_template_name) { my $template = firstval { $_->{'name'} eq $marc_modification_template_name } GetModificationTemplates(); if ($template) { --- a/t/db_dependent/www/EditBiblioMarcModificationTemplatePreference.t +++ a/t/db_dependent/www/EditBiblioMarcModificationTemplatePreference.t @@ -87,8 +87,8 @@ subtest 'Templates applied using simple and advanced MARC Editor' => sub { isa_ok($saved_record_250_field, 'MARC::Field', 'Field with tag 250 has been saved'); is($saved_record_250_field->subfield('a'), '250 bottles of beer on the wall', 'Field 250a has the same value passed to AddBiblio'); - my $old_template_preference = C4::Context->preference('EditBiblioMarcModificationTemplate'); - C4::Context->set_preference('EditBiblioMarcModificationTemplate', 'TEST'); + my $old_template_preference = C4::Context->preference('SaveBiblioMarcModificationTemplate'); + C4::Context->set_preference('SaveBiblioMarcModificationTemplate', 'TEST'); my $agent = Test::WWW::Mechanize->new(autocheck => 1); @@ -150,5 +150,5 @@ EOF # Clean up DelBiblio($biblionumber); DelModificationTemplate($template_id); - C4::Context->set_preference('EditBiblioMarcModificationTemplate', $old_template_preference); + C4::Context->set_preference('SaveBiblioMarcModificationTemplate', $old_template_preference); }; --