From f4ffb9b205821a96a50fbda8d62ab61567529a08 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Sep 2025 10:24:20 +0200 Subject: [PATCH] Bug 30515: Remove UsePatronPreferencesForOverdueNoticesPrint Signed-off-by: Philip Orr --- ...nsports_to_patron_messaging_preferences.pl | 21 ++++--------------- installer/data/mysql/mandatory/sysprefs.sql | 1 - .../admin/preferences/circulation.pref | 8 ------- misc/cronjobs/overdue_notices.pl | 6 ------ 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl b/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl index 748b2a74614..0b623ed3a80 100644 --- a/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl +++ b/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl @@ -1,11 +1,11 @@ use Modern::Perl; return { - bug_number => "30515", + bug_number => "30515", description => "Add system preferences for patron specific overdue notice preferences", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; + my ( $dbh, $out ) = @$args{qw(dbh out)}; $dbh->do( q{ @@ -49,18 +49,5 @@ return { ); say $out "UsePatronPreferencesForOverdueNotices system preference added"; - $dbh->do( - q{ - INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) - VALUES ( - 'UsePatronPreferencesForOverdueNoticesPrint', - 'always', - 'always|fallback|never', - 'When to send print notices when using patron specific messaging preferences for overdue notices', - 'Choice' - ) - } - ); - say $out "UsePatronPreferencesForOverdueNoticesPrint system preference added"; }, -} + } diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index b9d1458b144..72d09eec978 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -874,7 +874,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'), ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'), ('UsePatronPreferencesForOverdueNotices', '0', NULL, 'Use patron specific messaging preferences for overdue notices if available', 'YesNo'), -('UsePatronPreferencesForOverdueNoticesPrint', 'always', 'always|fallback|never', 'When to send print notices when using patron specific messaging preferences for overdue notices', 'Choice'), ('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 7baf41bb2da..d0aad028727 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -648,14 +648,6 @@ Circulation: 1: individual patron preference 0: patron category - when sending overdue notices. - - - - When using individual patron preferences for overdue notices - - pref: UsePatronPreferencesForOverdueNoticesPrint - choices: - always: always - fallback: when no other transport set - never: never - - print notice. - - pref: TrapHoldsOnOrder choices: diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 777f2cbabf4..adad85a8ee7 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -755,12 +755,6 @@ END_SQL if ( $patronpref && $patronpref->{'transports'} ) { @message_transport_types = keys %{ $patronpref->{'transports'} }; } - my $print_behavior = C4::Context->preference('UsePatronPreferencesForOverdueNoticesPrint'); - if ( $print_behavior eq 'always' - || $print_behavior eq 'fallback' && !@message_transport_types ) - { - unshift( @message_transport_types, 'shift' ); - } } else { my @message_transport_types = @{ GetOverdueMessageTransportTypes( $branchcode, $overdue_rules->{categorycode}, $i ) }; -- 2.34.1