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

(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 1805-1811 sub _koha_notify_reserve { Link Here
1805
        next if (
1805
        next if (
1806
               ( $mtt eq 'email' and not $to_address ) # No email address
1806
               ( $mtt eq 'email' and not $to_address ) # No email address
1807
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1807
            or ( $mtt eq 'sms'   and not $patron->smsalertnumber ) # No SMS number
1808
            or ( $mtt eq 'phone' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1808
            or ( $mtt eq 'itiva' and C4::Context->preference('TalkingTechItivaPhoneNotification') ) # Notice is handled by TalkingTech_itiva_outbound.pl
1809
        );
1809
        );
1810
1810
1811
        &$send_notification($mtt, $letter_code);
1811
        &$send_notification($mtt, $letter_code);
(-)a/installer/data/mysql/atomicupdate/bug_25333.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        UPDATE message_transport_types SET message_transport_type = "itiva" WHERE message_transport_type = "phone"
5
    });
6
7
    # Always end with this (adjust the bug info)
8
    NewVersion( $DBversion, 25333, q{Change message transport type for Talking Tech from "phone" to "itiva"});
9
}
(-)a/installer/data/mysql/mandatory/message_transport_types.sql (-1 / +1 lines)
Lines 4-7 values Link Here
4
('email'),
4
('email'),
5
('print'),
5
('print'),
6
('sms'),
6
('sms'),
7
('phone');
7
('itiva');
(-)a/installer/data/mysql/mandatory/sample_notices_message_transports.sql (-17 / +17 lines)
Lines 1-20 Link Here
1
insert into `message_transports`
1
insert into `message_transports`
2
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
2
(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`)
3
values
3
values
4
(1, 'email', 0, 'circulation', 'DUE'),
4
(1, 'email',       0, 'circulation', 'DUE'),
5
(1, 'email', 1, 'circulation', 'DUEDGST'),
5
(1, 'email',       1, 'circulation', 'DUEDGST'),
6
(1, 'sms',   0, 'circulation', 'DUE'),
6
(1, 'sms',         0, 'circulation', 'DUE'),
7
(1, 'sms',   1, 'circulation', 'DUEDGST'),
7
(1, 'sms',         1, 'circulation', 'DUEDGST'),
8
(2, 'email', 0, 'circulation', 'PREDUE'),
8
(2, 'email',       0, 'circulation', 'PREDUE'),
9
(2, 'email', 1, 'circulation', 'PREDUEDGST'),
9
(2, 'email',       1, 'circulation', 'PREDUEDGST'),
10
(2, 'sms',   0, 'circulation', 'PREDUE'),
10
(2, 'sms',         0, 'circulation', 'PREDUE'),
11
(2, 'sms',   1, 'circulation', 'PREDUEDGST'),
11
(2, 'sms',         1, 'circulation', 'PREDUEDGST'),
12
(2, 'phone', 0, 'circulation', 'PREDUE'),
12
(2, 'itiva', 0, 'circulation', 'PREDUE'),
13
(2, 'phone', 1, 'circulation', 'PREDUEDGST'),
13
(2, 'itiva', 1, 'circulation', 'PREDUEDGST'),
14
(4, 'email', 0, 'reserves',    'HOLD'),
14
(4, 'email',       0, 'reserves',    'HOLD'),
15
(4, 'sms',   0, 'reserves',    'HOLD'),
15
(4, 'sms',         0, 'reserves',    'HOLD'),
16
(4, 'phone', 0, 'reserves',    'HOLD'),
16
(4, 'itiva', 0, 'reserves',    'HOLD'),
17
(5, 'email', 0, 'circulation', 'CHECKIN'),
17
(5, 'email',       0, 'circulation', 'CHECKIN'),
18
(5, 'sms',   0, 'circulation', 'CHECKIN'),
18
(5, 'sms',         0, 'circulation', 'CHECKIN'),
19
(6, 'email', 0, 'circulation', 'CHECKOUT'),
19
(6, 'email',       0, 'circulation', 'CHECKOUT'),
20
(6, 'sms',   0, 'circulation', 'CHECKOUT');
20
(6, 'sms',         0, 'circulation', 'CHECKOUT');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (-11 / +11 lines)
Lines 74-104 Link Here
74
      [% END %]
74
      [% END %]
75
75
76
      [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]
76
      [% IF Koha.Preference('TalkingTechItivaPhoneNotification') %]
77
        [% IF ( messaging_preference.transport_phone ) %]
77
        [% IF ( messaging_preference.transport_itiva ) %]
78
          <td>
78
          <td>
79
          [% IF ( messaging_form_inactive ) %]
79
          [% IF ( messaging_form_inactive ) %]
80
              [% IF ( messaging_preference.transports_phone ) %]
80
              [% IF ( messaging_preference.transports_itiva ) %]
81
                 <input type="checkbox"
81
                 <input type="checkbox"
82
                 id="phone[% messaging_preference.message_attribute_id | html %]"
82
                 id="itiva[% messaging_preference.message_attribute_id | html %]"
83
                 name="[% messaging_preference.message_attribute_id | html %]"
83
                 name="[% messaging_preference.message_attribute_id | html %]"
84
                 value="phone" checked="checked" disabled="disabled" />
84
                 value="itiva" checked="checked" disabled="disabled" />
85
              [% ELSE %]
85
              [% ELSE %]
86
                 <input type="checkbox"
86
                 <input type="checkbox"
87
                 id="phone[% messaging_preference.message_attribute_id | html %]"
87
                 id="itiva[% messaging_preference.message_attribute_id | html %]"
88
                 name="[% messaging_preference.message_attribute_id | html %]"
88
                 name="[% messaging_preference.message_attribute_id | html %]"
89
                 value="phone" disabled="disabled" />
89
                 value="itiva" disabled="disabled" />
90
              [% END %]
90
              [% END %]
91
          [% ELSE %]
91
          [% ELSE %]
92
              [% IF ( messaging_preference.transports_phone ) %]
92
              [% IF ( messaging_preference.transports_itiva ) %]
93
                 <input type="checkbox"
93
                 <input type="checkbox"
94
                 id="phone[% messaging_preference.message_attribute_id | html %]"
94
                 id="itiva[% messaging_preference.message_attribute_id | html %]"
95
                 name="[% messaging_preference.message_attribute_id | html %]"
95
                 name="[% messaging_preference.message_attribute_id | html %]"
96
                 value="phone" checked="checked" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
96
                 value="itiva" checked="checked" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
97
              [% ELSE %]
97
              [% ELSE %]
98
                 <input type="checkbox"
98
                 <input type="checkbox"
99
                 id="phone[% messaging_preference.message_attribute_id | html %]"
99
                 id="itiva[% messaging_preference.message_attribute_id | html %]"
100
                 name="[% messaging_preference.message_attribute_id | html %]"
100
                 name="[% messaging_preference.message_attribute_id | html %]"
101
                 value="phone" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
101
                 value="itiva" class="active_notify" data-attr-id="[% messaging_preference.message_attribute_id | html %]" />
102
              [% END %]
102
              [% END %]
103
          [% END %]
103
          [% END %]
104
          </td>
104
          </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-1 / +1 lines)
Lines 401-407 Link Here
401
                                              SMS
401
                                              SMS
402
                                            [% CASE 'feed' %]
402
                                            [% CASE 'feed' %]
403
                                              Feed
403
                                              Feed
404
                                            [% CASE 'phone' %]
404
                                            [% CASE 'itiva' %]
405
                                              Phone
405
                                              Phone
406
                                            [% CASE %]
406
                                            [% CASE %]
407
                                              [% letter.message_transport_type | html %]
407
                                              [% letter.message_transport_type | html %]
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-6 / +5 lines)
Lines 145-151 foreach my $type (@types) { Link Here
145
                biblio      => $issues->{'biblionumber'},
145
                biblio      => $issues->{'biblionumber'},
146
                biblioitems => $issues->{'biblionumber'},
146
                biblioitems => $issues->{'biblionumber'},
147
            },
147
            },
148
            message_transport_type => 'phone',
148
            message_transport_type => 'itiva',
149
        );
149
        );
150
150
151
        die "No letter found for type $type!... dying\n" unless $letter;
151
        die "No letter found for type $type!... dying\n" unless $letter;
Lines 155-161 foreach my $type (@types) { Link Here
155
            $message_id = C4::Letters::EnqueueLetter(
155
            $message_id = C4::Letters::EnqueueLetter(
156
                {   letter                 => $letter,
156
                {   letter                 => $letter,
157
                    borrowernumber         => $issues->{'borrowernumber'},
157
                    borrowernumber         => $issues->{'borrowernumber'},
158
                    message_transport_type => 'phone',
158
                    message_transport_type => 'itiva',
159
                }
159
                }
160
            );
160
            );
161
        }
161
        }
Lines 250-256 sub GetOverdueIssues { Link Here
250
                JOIN overduerules USING (categorycode)
250
                JOIN overduerules USING (categorycode)
251
                JOIN overduerules_transport_types USING ( overduerules_id )
251
                JOIN overduerules_transport_types USING ( overduerules_id )
252
                WHERE ( overduerules.branchcode = borrowers.branchcode or overduerules.branchcode = '')
252
                WHERE ( overduerules.branchcode = borrowers.branchcode or overduerules.branchcode = '')
253
                AND overduerules_transport_types.message_transport_type = 'phone'
253
                AND overduerules_transport_types.message_transport_type = 'itiva'
254
                AND ( (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay1
254
                AND ( (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay1
255
                  OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay2
255
                  OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay2
256
                  OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay3 )
256
                  OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay3 )
Lines 292-298 sub GetPredueIssues { Link Here
292
                JOIN borrower_message_transport_preferences USING (borrower_message_preference_id)
292
                JOIN borrower_message_transport_preferences USING (borrower_message_preference_id)
293
                JOIN message_attributes USING (message_attribute_id)
293
                JOIN message_attributes USING (message_attribute_id)
294
                WHERE ( TO_DAYS( date_due ) - TO_DAYS( NOW() ) ) = days_in_advance
294
                WHERE ( TO_DAYS( date_due ) - TO_DAYS( NOW() ) ) = days_in_advance
295
                AND message_transport_type = 'phone'
295
                AND message_transport_type = 'itiva'
296
                AND message_name = 'Advance_Notice'
296
                AND message_name = 'Advance_Notice'
297
                $patron_branchcode_filter
297
                $patron_branchcode_filter
298
                ";
298
                ";
Lines 323-329 sub GetWaitingHolds { Link Here
323
                JOIN borrower_message_transport_preferences USING (borrower_message_preference_id)
323
                JOIN borrower_message_transport_preferences USING (borrower_message_preference_id)
324
                JOIN message_attributes USING (message_attribute_id)
324
                JOIN message_attributes USING (message_attribute_id)
325
                WHERE ( reserves.found = 'W' )
325
                WHERE ( reserves.found = 'W' )
326
                AND message_transport_type = 'phone'
326
                AND message_transport_type = 'itiva'
327
                AND message_name = 'Hold_Filled'
327
                AND message_name = 'Hold_Filled'
328
                $patron_branchcode_filter
328
                $patron_branchcode_filter
329
                ";
329
                ";
330
- 

Return to bug 25333