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

(-)a/installer/data/mysql/atomicupdate/bug_30484-add-ill-update-notice.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30484",
5
    description => "Add a notice template for ILL Update notices",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'email', 'default');});
10
        $dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');});
11
        $dbh->do(q{INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_update', 0);});
12
        my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef);
13
        if (defined $ready_id) {
14
            $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE');));
15
            $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_REQUEST_UPDATE');));
16
            $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');));
17
            say $out "Bug 30484 DB update complete";
18
        } else {
19
            say $out "Bug 30484 DB update not completed";
20
        }
21
    },
22
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+68 lines)
Lines 838-843 tables: Link Here
838
            - "[% branch.branchillemail %]"
838
            - "[% branch.branchillemail %]"
839
            - "[% branch.branchemail %]"
839
            - "[% branch.branchemail %]"
840
840
841
        - module: ill
842
          code: ILL_REQUEST_UPDATE
843
          branchcode: ""
844
          name: "ILL request update"
845
          is_html: 0
846
          title: "Interlibrary loan request update"
847
          message_transport_type: email
848
          lang: default
849
          content:
850
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
851
            - ""
852
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
853
            - ""
854
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
855
            - ""
856
            - "has been updated."
857
            - ""
858
            - "Details of the update are below:"
859
            - ""
860
            - "[% additional_text %]"
861
            - ""
862
            - "Kind Regards"
863
            - ""
864
            - "[% branch.branchname %]"
865
            - "[% branch.branchaddress1 %]"
866
            - "[% branch.branchaddress2 %]"
867
            - "[% branch.branchaddress3 %]"
868
            - "[% branch.branchcity %]"
869
            - "[% branch.branchstate %]"
870
            - "[% branch.branchzip %]"
871
            - "[% branch.branchphone %]"
872
            - "[% branch.branchillemail %]"
873
            - "[% branch.branchemail %]"
874
841
        - module: ill
875
        - module: ill
842
          code: ILL_PICKUP_READY
876
          code: ILL_PICKUP_READY
843
          branchcode: ""
877
          branchcode: ""
Lines 954-959 tables: Link Here
954
            - "[% branch.branchillemail %]"
988
            - "[% branch.branchillemail %]"
955
            - "[% branch.branchemail %]"
989
            - "[% branch.branchemail %]"
956
990
991
        - module: ill
992
          code: ILL_REQUEST_UPDATE
993
          branchcode: ""
994
          name: "ILL request update"
995
          is_html: 0
996
          title: "Interlibrary loan request update"
997
          message_transport_type: sms
998
          lang: default
999
          content:
1000
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
1001
            - ""
1002
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
1003
            - ""
1004
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
1005
            - ""
1006
            - "has been updated."
1007
            - ""
1008
            - "Details of the update are below:"
1009
            - ""
1010
            - "[% additional_text %]"
1011
            - ""
1012
            - "Kind Regards"
1013
            - ""
1014
            - "[% branch.branchname %]"
1015
            - "[% branch.branchaddress1 %]"
1016
            - "[% branch.branchaddress2 %]"
1017
            - "[% branch.branchaddress3 %]"
1018
            - "[% branch.branchcity %]"
1019
            - "[% branch.branchstate %]"
1020
            - "[% branch.branchzip %]"
1021
            - "[% branch.branchphone %]"
1022
            - "[% branch.branchillemail %]"
1023
            - "[% branch.branchemail %]"
1024
957
        - module: members
1025
        - module: members
958
          code: DISCHARGE
1026
          code: DISCHARGE
959
          branchcode: ""
1027
          branchcode: ""
(-)a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql (-1 / +2 lines)
Lines 9-13 values Link Here
9
(7, 'Ill_ready', 0),
9
(7, 'Ill_ready', 0),
10
(8, 'Ill_unavailable', 0),
10
(8, 'Ill_unavailable', 0),
11
(9, 'Auto_Renewals', 0),
11
(9, 'Auto_Renewals', 0),
12
(10, 'Hold_Reminder', 0);
12
(10, 'Hold_Reminder', 0),
13
(11, 'Ill_update', 0);
13
14
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-1 / +4 lines)
Lines 38-41 values Link Here
38
(10, 'email', 0, 'circulation', 'HOLD_REMINDER'),
38
(10, 'email', 0, 'circulation', 'HOLD_REMINDER'),
39
(10, 'sms',   0, 'circulation', 'HOLD_REMINDER'),
39
(10, 'sms',   0, 'circulation', 'HOLD_REMINDER'),
40
(10, 'phone', 0, 'circulation', 'HOLD_REMINDER'),
40
(10, 'phone', 0, 'circulation', 'HOLD_REMINDER'),
41
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER');
41
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER'),
42
(11, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE'),
43
(11, 'sms',   0, 'ill', 'ILL_REQUEST_UPDATE'),
44
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+1 lines)
Lines 29-34 Link Here
29
            [% END %]
29
            [% END %]
30
          [% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
30
          [% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
31
          [% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
31
          [% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
32
          [% ELSIF ( messaging_preference.Ill_update ) %]<span>Interlibrary loan updated</span>
32
          [% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
33
          [% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
33
          [% ELSE %]<span>Unknown</span>
34
          [% ELSE %]<span>Unknown</span>
34
          [% END %]
35
          [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+1 lines)
Lines 623-628 Link Here
623
                                                [% ELSIF ( prefs.Item_Checkout ) %]<span>Item checkout</span>
623
                                                [% ELSIF ( prefs.Item_Checkout ) %]<span>Item checkout</span>
624
                                                [% ELSIF ( prefs.Ill_ready ) %]<span>Interlibrary loan ready</span>
624
                                                [% ELSIF ( prefs.Ill_ready ) %]<span>Interlibrary loan ready</span>
625
                                                [% ELSIF ( prefs.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
625
                                                [% ELSIF ( prefs.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
626
                                                [% ELSIF ( prefs.Ill_update ) %]<span>Interlibrary loan updated</span>
626
                                                [% ELSIF ( prefs.Auto_Renewals ) %]<span>Auto renewal</span>
627
                                                [% ELSIF ( prefs.Auto_Renewals ) %]<span>Auto renewal</span>
627
                                                [% ELSIF ( prefs.Hold_Reminder ) %]<span>Hold reminder</span>
628
                                                [% ELSIF ( prefs.Hold_Reminder ) %]<span>Hold reminder</span>
628
                                                [% ELSE %]<span>Unknown</span>
629
                                                [% ELSE %]<span>Unknown</span>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +1 lines)
Lines 75-80 Link Here
75
                                                    [% END %]
75
                                                    [% END %]
76
                                                [% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
76
                                                [% ELSIF ( messaging_preference.Ill_ready ) %]<span>Interlibrary loan ready</span>
77
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
77
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
78
                                                [% ELSIF ( messaging_preference.Ill_update ) %]<span>Interlibrary loan updated</span>
78
                                                [% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
79
                                                [% ELSIF ( messaging_preference.Auto_Renewals ) %]<span>Auto renewal</span>
79
                                                [% ELSE %]<span>Unknown</span> [% END %]</td>
80
                                                [% ELSE %]<span>Unknown</span> [% END %]</td>
80
                                            [% IF ( messaging_preference.takes_days ) %]
81
                                            [% IF ( messaging_preference.takes_days ) %]
81
- 

Return to bug 28909