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

(-)a/installer/data/mysql/atomicupdate/Bug-4246-Talking-Tech-itiva-phone-notifications.pl (-7 / +7 lines)
Lines 7-24 my $dbh = C4::Context->dbh; Link Here
7
# add phone message transport type
7
# add phone message transport type
8
$dbh->do("INSERT INTO message_transport_types (message_transport_type) VALUES ('phone')");
8
$dbh->do("INSERT INTO message_transport_types (message_transport_type) VALUES ('phone')");
9
9
10
# adds HOLD_PHONE and PREDUE_PHONE letters (as placeholders)
10
# adds HOLD and PREDUE letters (as placeholders)
11
$dbh->do("INSERT INTO letter (module, code, name, title, content) VALUES
11
$dbh->do("INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES
12
          ('reserves', 'HOLD_PHONE', 'Item Available for Pick-up (phone notice)', 'Item Available for Pick-up (phone notice)', 'Your item is available for pickup'),
12
          ('reserves', 'HOLD', 'Item Available for Pick-up (phone notice)', 'Item Available for Pick-up (phone notice)', 'Your item is available for pickup', 'phone'),
13
          ('circulation', 'PREDUE_PHONE', 'Advance Notice of Item Due (phone notice)', 'Advance Notice of Item Due (phone notice)', 'Your item is due soon'),
13
          ('circulation', 'PREDUE', 'Advance Notice of Item Due (phone notice)', 'Advance Notice of Item Due (phone notice)', 'Your item is due soon', 'phone'),
14
          ('circulation', 'OVERDUE_PHONE', 'Overdue Notice (phone notice)', 'Overdue Notice (phone notice)', 'Your item is overdue')
14
          ('circulation', 'OVERDUE', 'Overdue Notice (phone notice)', 'Overdue Notice (phone notice)', 'Your item is overdue', 'phone')
15
          ");
15
          ");
16
16
17
# add phone notifications to patron message preferences options
17
# add phone notifications to patron message preferences options
18
$dbh->do("INSERT INTO message_transports
18
$dbh->do("INSERT INTO message_transports
19
         (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES
19
         (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES
20
         (4, 'phone', 0, 'reserves', 'HOLD_PHONE'),
20
         (4, 'phone', 0, 'reserves', 'HOLD'),
21
         (2, 'phone', 0, 'circulation', 'PREDUE_PHONE')
21
         (2, 'phone', 0, 'circulation', 'PREDUE')
22
         ");
22
         ");
23
23
24
# add TalkingTechItivaPhoneNotification syspref
24
# add TalkingTechItivaPhoneNotification syspref
(-)a/installer/data/mysql/updatedatabase.pl (+33 lines)
Lines 8320-8325 if ( CheckVersion($DBversion) ) { Link Here
8320
}
8320
}
8321
8321
8322
8322
8323
8324
8325
8326
$DBversion = "3.15.00.XXX";
8327
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8328
    $dbh->do(q|
8329
        UPDATE letter
8330
        SET code="HOLD",
8331
            message_transport_type="phone",
8332
            name=(SELECT name FROM ( SELECT name FROM letter WHERE code="HOLD" LIMIT 1 ) AS t)
8333
        WHERE code="HOLD_PHONE"
8334
    |);
8335
8336
    $dbh->do(q|
8337
        UPDATE letter
8338
        SET code="PREDUE",
8339
            message_transport_type="phone",
8340
            name=(SELECT name FROM ( SELECT name FROM letter WHERE code="HOLD" LIMIT 1 ) AS t)
8341
        WHERE code="PREDUE_PHONE"
8342
    |);
8343
8344
    $dbh->do(q|
8345
        UPDATE letter
8346
        SET code="OVERDUE",
8347
            message_transport_type="phone",
8348
            name=(SELECT name FROM ( SELECT name FROM letter WHERE code="HOLD" LIMIT 1 ) AS t)
8349
        WHERE code="OVERDUE_PHONE"
8350
    |);
8351
8352
    print "Upgrade to $DBversion done (Bug 11867: Update letters *_PHONE)\n";
8353
    SetVersion($DBversion);
8354
}
8355
8323
=head1 FUNCTIONS
8356
=head1 FUNCTIONS
8324
8357
8325
=head2 TableExists($table)
8358
=head2 TableExists($table)
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-3 / +2 lines)
Lines 68-75 my $type_module_map = { Link Here
68
};
68
};
69
69
70
my $type_notice_map = {
70
my $type_notice_map = {
71
    'PREOVERDUE' => 'PREDUE_PHONE',
71
    'PREOVERDUE' => 'PREDUE',
72
    'OVERDUE'    => 'OVERDUE_PHONE',
72
    'OVERDUE'    => 'OVERDUE',
73
    'RESERVE'    => 'HOLD',
73
    'RESERVE'    => 'HOLD',
74
};
74
};
75
75
76
- 

Return to bug 11867