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

(-)a/installer/data/mysql/atomicupdate/bug_23781-recalls_sms_notices.pl (+28 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "23781",
5
    description => "Recalls notices and messaging preferences",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Return recalled item','Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>.','sms'), ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>.','sms') }
12
        );
13
14
        say $out "Added recalls SMS notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM";
15
16
        $dbh->do(
17
            q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (12, "email", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (12, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (12, "phone", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (13, "email", 0, "circulation", "RETURN_RECALLED_ITEM", null), (13, "sms", 0, "circulation", "RETURN_RECALLED_ITEM", null), (13, "phone", 0, "circulation", "RETURN_RECALLED_ITEM", null) }
18
        );
19
20
        say $out "Added message transports for recalls notices";
21
22
        $dbh->do(
23
            q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (12, 'Recall_Waiting', 0), (13, 'Recall_Requested', 0) }
24
        );
25
26
        say $out "Added message attributes for recalls: Recall_Waiting, Recall_Requested";
27
    },
28
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+22 lines)
Lines 2278-2283 tables: Link Here
2278
            - ""
2278
            - ""
2279
            - "Thank you!"
2279
            - "Thank you!"
2280
2280
2281
        - module: circulation
2282
          code: RETURN_RECALLED_ITEM
2283
          branchcode: ""
2284
          name: "Notification to return a recalled item"
2285
          is_html: 0
2286
          title: "Return recalled item"
2287
          message_transport_type: sms
2288
          lang: default
2289
          content:
2290
            - "Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>."
2291
2292
        - module: circulation
2293
          code: PICKUP_RECALLED_ITEM
2294
          branchcode: ""
2295
          name: "Recalled item awaiting pickup"
2296
          is_html: 0
2297
          title: "Recalled item awaiting pickup"
2298
          message_transport_type: sms
2299
          lang: default
2300
          content:
2301
            - "A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>."
2302
2281
        - module: circulation
2303
        - module: circulation
2282
          code: RECALL_REQUESTER_DET
2304
          code: RECALL_REQUESTER_DET
2283
          branchcode: ""
2305
          branchcode: ""
(-)a/installer/data/mysql/mandatory/sample_notices_message_attributes.sql (-2 / +3 lines)
Lines 10-14 values Link Here
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
(11, 'Ill_update', 0),
14
14
(12, 'Recall_Waiting', 0),
15
(13, 'Recall_Requested', 0);
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-2 / +7 lines)
Lines 44-47 values Link Here
44
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER'),
44
(10, 'itiva', 0, 'circulation', 'HOLD_REMINDER'),
45
(11, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE'),
45
(11, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE'),
46
(11, 'sms',   0, 'ill', 'ILL_REQUEST_UPDATE'),
46
(11, 'sms',   0, 'ill', 'ILL_REQUEST_UPDATE'),
47
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');
47
(11, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE'),
48
(12, "email", 0, "circulation", "PICKUP_RECALLED_ITEM"),
49
(12, "sms",   0, "circulation", "PICKUP_RECALLED_ITEM"),
50
(12, "phone",   0, "circulation", "PICKUP_RECALLED_ITEM"),
51
(13, "email", 0, "circulation", "RETURN_RECALLED_ITEM"),
52
(13, "sms",   0, "circulation", "RETURN_RECALLED_ITEM"),
53
(13, "phone",   0, "circulation", "RETURN_RECALLED_ITEM");
48
- 

Return to bug 23781