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

(-)a/C4/Members/Messaging.pm (-1 / +4 lines)
Lines 230-236 END_SQL Link Here
230
        'Auto_Renewals'    => 9,
230
        'Auto_Renewals'    => 9,
231
        'Advance_Notice'   => 10,
231
        'Advance_Notice'   => 10,
232
        'Item_Due'         => 11,
232
        'Item_Due'         => 11,
233
        'Item_Check_in'    => 12
233
        'Item_Check_in'    => 12,
234
        'Overdue1'         => 13,
235
        'Overdue2'         => 14,
236
        'Overdue3'         => 15,
234
    );
237
    );
235
238
236
    @return =
239
    @return =
(-)a/installer/data/mysql/atomicupdate/bug_30515-add_system_preferences.pl (-16 lines)
Lines 1-16 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30515",
5
    description => "Add system preferences for patron specific overdue notice preferences",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('UsePatronPreferencesForOverdueNotices', '0', NULL, 'Use patron specific messaging preferences for overdue notices if available', 'YesNo')});
11
        say $out "UsePatronPreferencesForOverdueNotices system preference added";
12
13
        $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')});
14
        say $out "UsePatronPreferencesForOverdueNoticesPrint system preference added";
15
    },
16
};
(-)a/installer/data/mysql/atomicupdate/bug_30515-move_overdue_transports_to_patron_messaging_preferences.pl (+66 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30515",
5
    description => "Add system preferences for patron specific overdue notice preferences",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{
12
                INSERT IGNORE INTO `message_attributes`
13
                    (`message_attribute_id`, `message_name`, `takes_days`)
14
                VALUES
15
                    (15, 'Overdue1', 0),
16
                    (16, 'Overdue2', 0),
17
                    (17, 'Overdue3', 0)
18
            }
19
        );
20
        say $out "Message attributes for overdue notices added";
21
22
        $dbh->do(
23
            q{
24
                INSERT IGNORE INTO `message_transports`
25
                    (`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
26
                VALUES
27
                    (15, 'email', 0, 'circulation', 'ODUE'),
28
                    (15, 'sms', 0, 'circulation', 'ODUE'),
29
                    (16, 'email', 0, 'circulation', 'ODUE2'),
30
                    (16, 'sms', 0, 'circulation', 'ODUE2'),
31
                    (17, 'email', 0, 'circulation', 'ODUE3'),
32
                    (17, 'sms', 0, 'circulation', 'ODUE3')
33
            }
34
        );
35
        say $out "Message transports for overdue notices added";
36
37
        $dbh->do(
38
            q{
39
                INSERT IGNORE INTO systempreferences
40
                    (`variable`, `value`, `options`, `explanation`, `type`)
41
                VALUES (
42
                    'UsePatronPreferencesForOverdueNotices',
43
                    '0',
44
                    NULL,
45
                    'Use patron specific messaging preferences for overdue notices if available',
46
                    'YesNo'
47
                )
48
            }
49
        );
50
        say $out "UsePatronPreferencesForOverdueNotices system preference added";
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
    },
66
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-1 / +63 lines)
Lines 881-887 tables: Link Here
881
          content:
881
          content:
882
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
882
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
883
            - ""
883
            - ""
884
            - "According to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible."
884
            - "According to our current records, you have items that are overdue. Your library does not charge late fines, but please return or renew them at the branch below as soon as possible."
885
            - ""
886
            - "<<branches.branchname>>"
887
            - "<<branches.branchaddress1>>"
888
            - "<<branches.branchaddress2>> <<branches.branchaddress3>>"
889
            - "Phone: <<branches.branchphone>>"
890
            - "Fax: <<branches.branchfax>>"
891
            - "Email: <<branches.branchemail>>"
892
            - ""
893
            - "If you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned."
894
            - ""
895
            - "The following item(s) is/are currently overdue:"
896
            - ""
897
            - "<item>\"<<biblio.title>>\" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>"
898
            - ""
899
            - "Thank-you for your prompt attention to this matter."
900
            - ""
901
            - "<<branches.branchname>> Staff"
902
            - ""
903
904
        - module: circulation
905
          code: ODUE2
906
          branchcode: ""
907
          name: "Overdue notice"
908
          is_html: 0
909
          title: "Item overdue"
910
          message_transport_type: email
911
          lang: default
912
          content:
913
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
914
            - ""
915
            - "According to our current records, you have items that are overdue. This is the second reminder. Your library does not charge late fines, but please return or renew them at the branch below as soon as possible."
916
            - ""
917
            - "<<branches.branchname>>"
918
            - "<<branches.branchaddress1>>"
919
            - "<<branches.branchaddress2>> <<branches.branchaddress3>>"
920
            - "Phone: <<branches.branchphone>>"
921
            - "Fax: <<branches.branchfax>>"
922
            - "Email: <<branches.branchemail>>"
923
            - ""
924
            - "If you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned."
925
            - ""
926
            - "The following item(s) is/are currently overdue:"
927
            - ""
928
            - "<item>\"<<biblio.title>>\" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>"
929
            - ""
930
            - "Thank-you for your prompt attention to this matter."
931
            - ""
932
            - "<<branches.branchname>> Staff"
933
            - ""
934
935
        - module: circulation
936
          code: ODUE3
937
          branchcode: ""
938
          name: "Overdue notice"
939
          is_html: 0
940
          title: "Item overdue"
941
          message_transport_type: email
942
          lang: default
943
          content:
944
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
945
            - ""
946
            - "According to our current records, you have items that are overdue. This is the final reminder. Your library does not charge late fines, but please return or renew them at the branch below as soon as possible."
885
            - ""
947
            - ""
886
            - "<<branches.branchname>>"
948
            - "<<branches.branchname>>"
887
            - "<<branches.branchaddress1>>"
949
            - "<<branches.branchaddress1>>"
(-)a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql (-1 / +4 lines)
Lines 13-16 values Link Here
13
(11, 'Ill_update', 0),
13
(11, 'Ill_update', 0),
14
(12, 'Recall_Waiting', 0),
14
(12, 'Recall_Waiting', 0),
15
(13, 'Recall_Requested', 0),
15
(13, 'Recall_Requested', 0),
16
(14, 'Patron_Expiry', 0);
16
(14, 'Patron_Expiry', 0)
17
(15, 'Overdue1', 0),
18
(16, 'Overdue2', 0),
19
(17, 'Overdue3', 0);
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-2 / +7 lines)
Lines 55-58 values Link Here
55
(13, "phone",   0, "circulation", "RETURN_RECALLED_ITEM"),
55
(13, "phone",   0, "circulation", "RETURN_RECALLED_ITEM"),
56
(14, "email", 0, "members", "MEMBERSHIP_EXPIRY"),
56
(14, "email", 0, "members", "MEMBERSHIP_EXPIRY"),
57
(14, "sms",   0, "members", "MEMBERSHIP_EXPIRY"),
57
(14, "sms",   0, "members", "MEMBERSHIP_EXPIRY"),
58
(14, "phone",   0, "members", "MEMBERSHIP_EXPIRY");
58
(14, "phone",   0, "members", "MEMBERSHIP_EXPIRY")
59
(15, 'email', 0, 'circulation', 'ODUE'),
60
(15, 'sms', 0, 'circulation', 'ODUE'),
61
(16, 'email', 0, 'circulation', 'ODUE2'),
62
(16, 'sms', 0, 'circulation', 'ODUE2'),
63
(17, 'email', 0, 'circulation', 'ODUE3'),
64
(17, 'sms', 0, 'circulation', 'ODUE3'),;
59
- 

Return to bug 30515