From 2fbcbaba3c69e0ca88e689d2b05121ff8d58e353 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: krimsonkharne --- ...nsports_to_patron_messaging_preferences.pl | 21 ++++--------------- installer/data/mysql/mandatory/sysprefs.sql | 3 +-- .../admin/preferences/circulation.pref | 8 ------- misc/cronjobs/overdue_notices.pl | 6 ------ 4 files changed, 5 insertions(+), 33 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 748b2a7461..0b623ed3a8 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 661af4bd33..c87a623652 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'), @@ -893,4 +892,4 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), ('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), ('z3950Status','','','This syspref allows to define custom YAML based rules for marking items unavailable in z3950 results.','Textarea') -; \ No newline at end of file +; 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 7baf41bb2d..d0aad02872 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 e797710811..ea5d9e57f8 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.39.5