View | Details | Raw Unified | Return to bug 30484
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, 'email', 0, 'sms', '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, 'email', 0, 'phone', '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 832-837 tables: Link Here
832
            - "[% branch.branchillemail %]"
832
            - "[% branch.branchillemail %]"
833
            - "[% branch.branchemail %]"
833
            - "[% branch.branchemail %]"
834
834
835
        - module: ill
836
          code: ILL_REQUEST_UPDATE
837
          branchcode: ""
838
          name: "ILL request update"
839
          is_html: 0
840
          title: "Interlibrary loan request update"
841
          message_transport_type: email
842
          lang: default
843
          content:
844
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
845
            - ""
846
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
847
            - ""
848
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
849
            - ""
850
            - "has been updated."
851
            - ""
852
            - "Details of the update are below:"
853
            - ""
854
            - "[% additional_text %]"
855
            - ""
856
            - "Kind Regards"
857
            - ""
858
            - "[% branch.branchname %]"
859
            - "[% branch.branchaddress1 %]"
860
            - "[% branch.branchaddress2 %]"
861
            - "[% branch.branchaddress3 %]"
862
            - "[% branch.branchcity %]"
863
            - "[% branch.branchstate %]"
864
            - "[% branch.branchzip %]"
865
            - "[% branch.branchphone %]"
866
            - "[% branch.branchillemail %]"
867
            - "[% branch.branchemail %]"
868
835
        - module: ill
869
        - module: ill
836
          code: ILL_PICKUP_READY
870
          code: ILL_PICKUP_READY
837
          branchcode: ""
871
          branchcode: ""
Lines 948-953 tables: Link Here
948
            - "[% branch.branchillemail %]"
982
            - "[% branch.branchillemail %]"
949
            - "[% branch.branchemail %]"
983
            - "[% branch.branchemail %]"
950
984
985
        - module: ill
986
          code: ILL_REQUEST_UPDATE
987
          branchcode: ""
988
          name: "ILL request update"
989
          is_html: 0
990
          title: "Interlibrary loan request update"
991
          message_transport_type: sms
992
          lang: default
993
          content:
994
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
995
            - ""
996
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
997
            - ""
998
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
999
            - ""
1000
            - "has been updated."
1001
            - ""
1002
            - "Details of the update are below:"
1003
            - ""
1004
            - "[% additional_text %]"
1005
            - ""
1006
            - "Kind Regards"
1007
            - ""
1008
            - "[% branch.branchname %]"
1009
            - "[% branch.branchaddress1 %]"
1010
            - "[% branch.branchaddress2 %]"
1011
            - "[% branch.branchaddress3 %]"
1012
            - "[% branch.branchcity %]"
1013
            - "[% branch.branchstate %]"
1014
            - "[% branch.branchzip %]"
1015
            - "[% branch.branchphone %]"
1016
            - "[% branch.branchillemail %]"
1017
            - "[% branch.branchemail %]"
1018
951
        - module: members
1019
        - module: members
952
          code: DISCHARGE
1020
          code: DISCHARGE
953
          branchcode: ""
1021
          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 598-603 Link Here
598
                                                [% ELSIF ( prefs.Item_Checkout ) %]<span>Item checkout</span>
598
                                                [% ELSIF ( prefs.Item_Checkout ) %]<span>Item checkout</span>
599
                                                [% ELSIF ( prefs.Ill_ready ) %]<span>Interlibrary loan ready</span>
599
                                                [% ELSIF ( prefs.Ill_ready ) %]<span>Interlibrary loan ready</span>
600
                                                [% ELSIF ( prefs.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
600
                                                [% ELSIF ( prefs.Ill_unavailable ) %]<span>Interlibrary loan unavailable</span>
601
                                                [% ELSIF ( prefs.Ill_update ) %]<span>Interlibrary loan updated</span>
601
                                                [% ELSIF ( prefs.Auto_Renewals ) %]<span>Auto renewal</span>
602
                                                [% ELSIF ( prefs.Auto_Renewals ) %]<span>Auto renewal</span>
602
                                                [% ELSIF ( prefs.Hold_Reminder ) %]<span>Hold reminder</span>
603
                                                [% ELSIF ( prefs.Hold_Reminder ) %]<span>Hold reminder</span>
603
                                                [% ELSE %]<span>Unknown</span>
604
                                                [% 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 ) %]Interlibrary loan ready
76
                                                [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
77
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
77
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
78
                                                [% ELSIF ( messaging_preference.Ill_update ) %]Interlibrary loan updated
78
                                                [% ELSIF ( messaging_preference.Auto_Renewals ) %]Auto renewal
79
                                                [% ELSIF ( messaging_preference.Auto_Renewals ) %]Auto renewal
79
                                                [% ELSE %]Unknown [% END %]</td>
80
                                                [% ELSE %]Unknown [% END %]</td>
80
                                            [% IF ( messaging_preference.takes_days ) %]
81
                                            [% IF ( messaging_preference.takes_days ) %]
81
- 

Return to bug 30484