From f6395a7f144dcdb8589adcbb4e999d0e10cd4aa8 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 5 Jun 2025 08:47:40 +0200 Subject: [PATCH] Bug 40070: Add new preference DisplayPublishedDate Test plan: Run install or update Check new preference under Administration Signed-off-by: Marcel de Rooy Signed-off-by: Laura_Escamilla --- .../data/mysql/atomicupdate/bug_40070.pl | 19 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/serials.pref | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_40070.pl diff --git a/installer/data/mysql/atomicupdate/bug_40070.pl b/installer/data/mysql/atomicupdate/bug_40070.pl new file mode 100755 index 0000000000..59a998ffea --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_40070.pl @@ -0,0 +1,19 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "40070", + description => "Add pref DisplayPublishedDate", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('DisplayPublishedDate', '1', NULL, 'Display serial publisheddate on detail pages', 'YesNo') + } + ); + say_success( $out, "Added new system preference DisplayPublishedDate" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 0d77d5ba94..c3fa93d504 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -229,6 +229,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('DisplayMultiItemHolds','0','','Display the ability to place holds on different items at the same time in staff interface and OPAC','YesNo'), ('DisplayMultiPlaceHold','1','','Display the ability to place multiple holds or not','YesNo'), ('DisplayOPACiconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.','YesNo'), +('DisplayPublishedDate', '1', NULL, 'Display serial publisheddate on detail pages', 'YesNo'), ('DumpSearchQueryTemplate',0,'','Add the search query being passed to the search engine into the template for debugging','YesNo'), ('DumpTemplateVarsIntranet', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the staff intranet.', 'YesNo'), ('DumpTemplateVarsOpac', '0', NULL , 'If enabled, dump all Template Toolkit variable to a comment in the html source for the opac.', 'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref index 800a174813..d91b408336 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref @@ -1,5 +1,11 @@ Serials: Features: + - + - pref: DisplayPublishedDate + choices: + 1: Show + 0: "Don't show" + - date published for a serial issue (item) on OPAC or staff detail page. - - Show - pref: opacSerialDefaultTab -- 2.39.5