Bugzilla – Attachment 179915 Details for
Bug 39171
Rename IS02709 ElasticsearchMARCFormat to base64ISO2709
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39171: Rename IS02709 ElasticsearchMARCFormat to base64ISO2709
Bug-39171-Rename-IS02709-ElasticsearchMARCFormat-t.patch (text/plain), 5.80 KB, created by
Thomas Klausner
on 2025-03-31 08:47:42 UTC
(
hide
)
Description:
Bug 39171: Rename IS02709 ElasticsearchMARCFormat to base64ISO2709
Filename:
MIME Type:
Creator:
Thomas Klausner
Created:
2025-03-31 08:47:42 UTC
Size:
5.80 KB
patch
obsolete
>From 685f9faeb40868969f4996dce7e2b6108fb04a4c Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Wed, 19 Feb 2025 18:27:17 +0100 >Subject: [PATCH] Bug 39171: Rename IS02709 ElasticsearchMARCFormat to > base64ISO2709 > >To test: >1) Apply patch >2) Make sure tests in t/db_dependent/Koha/SearchEngine/Elasticsearch.t > pass > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > ...709_ElasticsearchMarcFormat_to_base64ISO2709.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/admin.pref | 4 ++-- > t/db_dependent/Koha/SearchEngine/Elasticsearch.t | 6 +++--- > 4 files changed, 20 insertions(+), 6 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_39171-rename_IS02709_ElasticsearchMarcFormat_to_base64ISO2709.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_39171-rename_IS02709_ElasticsearchMarcFormat_to_base64ISO2709.pl b/installer/data/mysql/atomicupdate/bug_39171-rename_IS02709_ElasticsearchMarcFormat_to_base64ISO2709.pl >new file mode 100755 >index 0000000000..eee86af1e9 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_39171-rename_IS02709_ElasticsearchMarcFormat_to_base64ISO2709.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "39171", >+ description => "Rename ElasticsearchMARCFormat syspref options", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ UPDATE systempreferences SET options = 'base64ISO2709|ARRAY' WHERE variable = 'ElasticsearchMARCFormat' }); >+ $dbh->do(q{ UPDATE systempreferences SET value = 'base64ISO2709' WHERE variable = 'ElasticsearchMARCFormat' AND value = 'ISO2709' }); >+ say $out "Renamed options for 'ElasticsearchMARCFormat' system preference"; >+ }, >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 2bf9d0b648..62ed4437de 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -234,7 +234,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'), > ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL), > ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL), >-('ElasticsearchMARCFormat', 'ISO2709', 'ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'), >+('ElasticsearchMARCFormat', 'base64ISO2709', 'base64ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'), > ('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'), > ('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'), > ('EmailFieldPrecedence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','multiple'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 18d21a955a..eac9b14907 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -304,9 +304,9 @@ Administration: > - > - "Elasticsearch MARC format: " > - pref: ElasticsearchMARCFormat >- default: "ISO2709" >+ default: "base64ISO2709" > choices: >- "ISO2709": "ISO2709 (exchange format)" >+ "base64ISO2709": "ISO2709 (exchange format)" > "ARRAY": "Searchable array" > - <br>ISO2709 format is recommended as it is faster and takes less space, whereas array format makes the full MARC record searchable. > - <br><strong>NOTE:</strong> Making the full record searchable may have a negative effect on relevance ranking of search results. >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >index 2b46b66d3a..8ee3ae0541 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch.t >@@ -212,7 +212,7 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' > plan tests => 70; > > t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); >- t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'ISO2709' ); >+ t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' ); > > my @mappings = ( > { >@@ -744,7 +744,7 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' > > ok( !( defined $docs->[0]->{unimarc_title} ), "No mapping when marc_type doesn't match marc flavour" ); > >- # Marc serialization format fallback for records exceeding ISO2709 max record size >+ # Marc serialization format fallback for records exceeding base64ISO2709 max record size > > my $large_marc_record = MARC::Record->new(); > $large_marc_record->leader(' cam 22 a 4500'); >@@ -970,7 +970,7 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori > plan tests => 5; > > t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); >- t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'ISO2709' ); >+ t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' ); > > my $builder = t::lib::TestBuilder->new; > my $auth_type = >-- >2.39.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 39171
:
178373
|
178374
|
178375
|
178384
|
179915
|
179916
|
179917
|
179918