From c81ff61bf8c0647b41af558d9121a580b65ed261 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Wed, 20 Nov 2024 13:15:43 +0000 Subject: [PATCH] Bug 38494: Add 'ConsiderHeadingUse' system preference Add new system preference 'ConsiderHeadingUse' to be able to consider the intended use of authority records (008/14-16) during cataloging and linking. Sponsored-by: Ignatianum University in Cracow --- .../bug_38494-ConsiderHeadingUse_syspref.pl | 17 +++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/authorities.pref | 7 +++++++ 3 files changed, 25 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_38494-ConsiderHeadingUse_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_38494-ConsiderHeadingUse_syspref.pl b/installer/data/mysql/atomicupdate/bug_38494-ConsiderHeadingUse_syspref.pl new file mode 100755 index 0000000000..a299fcc645 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_38494-ConsiderHeadingUse_syspref.pl @@ -0,0 +1,17 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "38494", + description => "Add `ConsiderHeadingUse` preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ConsiderHeadingUse', '0', NULL, 'Consider authority heading use (main/added entry, or subject, or series title) in cataloging and linking', 'YesNo')} + ); + + say_success( $out, "Added system preference 'ConsiderHeadingUse'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index f49557be9c..18ba14e13a 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -172,6 +172,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), +('ConsiderHeadingUse', '0', NULL, 'Consider authority heading use (main/added entry, or subject, or series title) in cataloging and linking', 'YesNo'), ('ConsiderLibraryHoursInCirculation', 'close', 'close|open|ignore', "Take library opening hours into consideration to calculate due date when circulating.", 'Choice'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), ('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref index 484368fffe..703b8e5d8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref @@ -95,6 +95,13 @@ Authorities: - Display the MARC field/subfields - pref: AdditionalFieldsInZ3950ResultAuthSearch - " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"001, 035$a\")" + - + - pref: ConsiderHeadingUse + default: no + choices: + 1: Do + 0: "Don't" + - consider the intended use of authority records (008/14-16) during cataloging and linking. Linker: - -- 2.39.5