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 2283-2288 tables: Link Here
2283
            - ""
2283
            - ""
2284
            - "Thank you!"
2284
            - "Thank you!"
2285
2285
2286
        - module: circulation
2287
          code: RETURN_RECALLED_ITEM
2288
          branchcode: ""
2289
          name: "Notification to return a recalled item"
2290
          is_html: 0
2291
          title: "Return recalled item"
2292
          message_transport_type: sms
2293
          lang: default
2294
          content:
2295
            - "Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>."
2296
2297
        - module: circulation
2298
          code: PICKUP_RECALLED_ITEM
2299
          branchcode: ""
2300
          name: "Recalled item awaiting pickup"
2301
          is_html: 0
2302
          title: "Recalled item awaiting pickup"
2303
          message_transport_type: sms
2304
          lang: default
2305
          content:
2306
            - "A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>."
2307
2286
        - module: circulation
2308
        - module: circulation
2287
          code: RECALL_REQUESTER_DET
2309
          code: RECALL_REQUESTER_DET
2288
          branchcode: ""
2310
          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