View | Details | Raw Unified | Return to bug 30515
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl (-17 / +4 lines)
Lines 1-11 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
return {
3
return {
4
    bug_number => "30515",
4
    bug_number  => "30515",
5
    description => "Add system preferences for patron specific overdue notice preferences",
5
    description => "Add system preferences for patron specific overdue notice preferences",
6
    up => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        $dbh->do(
10
        $dbh->do(
11
            q{
11
            q{
Lines 49-66 return { Link Here
49
        );
49
        );
50
        say $out "UsePatronPreferencesForOverdueNotices system preference added";
50
        say $out "UsePatronPreferencesForOverdueNotices system preference added";
51
51
52
        $dbh->do(
53
            q{
54
                INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
55
                VALUES (
56
                    'UsePatronPreferencesForOverdueNoticesPrint',
57
                    'always',
58
                    'always|fallback|never',
59
                    'When to send print notices when using patron specific messaging preferences for overdue notices',
60
                    'Choice'
61
                )
62
            }
63
        );
64
        say $out "UsePatronPreferencesForOverdueNoticesPrint system preference added";
65
    },
52
    },
66
}
53
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 / +1 lines)
Lines 874-880 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
874
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
874
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
875
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
875
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
876
('UsePatronPreferencesForOverdueNotices', '0', NULL, 'Use patron specific messaging preferences for overdue notices if available', 'YesNo'),
876
('UsePatronPreferencesForOverdueNotices', '0', NULL, 'Use patron specific messaging preferences for overdue notices if available', 'YesNo'),
877
('UsePatronPreferencesForOverdueNoticesPrint', 'always', 'always|fallback|never', 'When to send print notices when using patron specific messaging preferences for overdue notices', 'Choice'),
878
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
877
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
879
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
878
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
880
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
879
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
Lines 893-896 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
893
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
892
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
894
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
893
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
895
('z3950Status','','','This syspref allows to define custom YAML based rules for marking items unavailable in z3950 results.','Textarea')
894
('z3950Status','','','This syspref allows to define custom YAML based rules for marking items unavailable in z3950 results.','Textarea')
896
;
895
;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-8 lines)
Lines 648-661 Circulation: Link Here
648
                  1: individual patron preference
648
                  1: individual patron preference
649
                  0: patron category
649
                  0: patron category
650
            - when sending overdue notices.
650
            - when sending overdue notices.
651
        -
652
            - When using individual patron preferences for overdue notices
653
            - pref: UsePatronPreferencesForOverdueNoticesPrint
654
              choices:
655
                  always: always
656
                  fallback: when no other transport set
657
                  never: never
658
            - print notice.
659
        -
651
        -
660
            - pref: TrapHoldsOnOrder
652
            - pref: TrapHoldsOnOrder
661
              choices:
653
              choices:
(-)a/misc/cronjobs/overdue_notices.pl (-7 lines)
Lines 755-766 END_SQL Link Here
755
                    if ( $patronpref && $patronpref->{'transports'} ) {
755
                    if ( $patronpref && $patronpref->{'transports'} ) {
756
                        @message_transport_types = keys %{ $patronpref->{'transports'} };
756
                        @message_transport_types = keys %{ $patronpref->{'transports'} };
757
                    }
757
                    }
758
                    my $print_behavior = C4::Context->preference('UsePatronPreferencesForOverdueNoticesPrint');
759
                    if (   $print_behavior eq 'always'
760
                        || $print_behavior eq 'fallback' && !@message_transport_types )
761
                    {
762
                        unshift( @message_transport_types, 'shift' );
763
                    }
764
                } else {
758
                } else {
765
                    my @message_transport_types =
759
                    my @message_transport_types =
766
                        @{ GetOverdueMessageTransportTypes( $branchcode, $overdue_rules->{categorycode}, $i ) };
760
                        @{ GetOverdueMessageTransportTypes( $branchcode, $overdue_rules->{categorycode}, $i ) };
767
- 

Return to bug 30515