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

(-)a/C4/Letters.pm (-1 / +1 lines)
Lines 1116-1122 sub GetQueuedMessages { Link Here
1116
1116
1117
    my $dbh = C4::Context->dbh();
1117
    my $dbh = C4::Context->dbh();
1118
    my $statement = << 'ENDSQL';
1118
    my $statement = << 'ENDSQL';
1119
SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code
1119
SELECT message_id, borrowernumber, subject, content, message_transport_type, status, time_queued, updated_on, failure_code, from_address, to_address, cc_address
1120
FROM message_queue
1120
FROM message_queue
1121
ENDSQL
1121
ENDSQL
1122
1122
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-13 / +20 lines)
Lines 94-113 Link Here
94
                                            <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates  with_hours => 1 %]</td>
94
                                            <td data-order="[% QUEUED_MESSAGE.time_queued | html %]">[% QUEUED_MESSAGE.time_queued | $KohaDates  with_hours => 1 %]</td>
95
                                            <td>
95
                                            <td>
96
                                                [% IF ( QUEUED_MESSAGE.failure_code ) %]
96
                                                [% IF ( QUEUED_MESSAGE.failure_code ) %]
97
                                                    [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]<span>Invalid borrowernumber [% borrowernumber | html %]</span>
97
                                                    [% IF ( QUEUED_MESSAGE.failure_code == "INVALID_BORNUMBER" ) %]<span class="clearfix">Invalid borrowernumber [% borrowernumber | html %]</span>
98
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]<span>Unable to find an email address for this borrower</span>
98
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_EMAIL' ) %]<span class="clearfix">Unable to find an email address for this borrower</span>
99
                                                    [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]<span>Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]</span>
99
                                                    [% ELSIF (matches = QUEUED_MESSAGE.failure_code.match('INVALID_EMAIL:(\w+)') ) %]<span class="clearfix">Invalid [% matches.0 | html %] email address found [% borrowernumber | html %]</span>
100
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]<span>Missing from email address</span>
100
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_FROM' ) %]<span class="clearfix">Missing from email address</span>
101
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]<span>Missing SMS number</span>
101
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'MISSING_SMS' ) %]<span class="clearfix">Missing SMS number</span>
102
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]<span>Message is duplicate</span>
102
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'DUPLICATE_MESSAGE' ) %]<span class="clearfix">Message is duplicate</span>
103
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]<span>No notes from SMS driver</span>
103
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'NO_NOTES' ) %]<span class="clearfix">No notes from SMS driver</span>
104
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]<span>Unhandled email failure, check the logs for further details</span>
104
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == 'SENDMAIL' ) %]<span class="clearfix">Unhandled email failure, check the logs for further details</span>
105
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]<span>Unknown error</span>
105
                                                    [% ELSIF ( QUEUED_MESSAGE.failure_code == "UNKNOWN_ERROR" ) %]<span class="clearfix">Unknown error</span>
106
                                                    [% ELSE %]<span>Error occurred while sending email.</span>
106
                                                    [% ELSE %]<span class="clearfix">Error occurred while sending email.</span>
107
                                                    [% END %]
107
                                                    [% END %]
108
                                                [% END %]
108
                                                [% END %]
109
                                                [% IF ( QUEUED_MESSAGE.cc_address ) %]
109
                                                [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]
110
                                                    <span>Notice copied to: [% QUEUED_MESSAGE.cc_address | html %]</span>
110
                                                    [% IF ( QUEUED_MESSAGE.from_address ) %]
111
                                                        <span class="clearfix"><span class="label">from:</span> [% QUEUED_MESSAGE.from_address | html %]</span>
112
                                                    [% END %]
113
                                                    [% IF ( QUEUED_MESSAGE.to_address ) %]
114
                                                        <span class="clearfix"><span class="label">to:</span> [% QUEUED_MESSAGE.to_address | html %]</span>
115
                                                    [% END %]
116
                                                    [% IF ( QUEUED_MESSAGE.cc_address ) %]
117
                                                        <span class="clearfix"><span class="label">cc:</span> [% QUEUED_MESSAGE.cc_address | html %]</span>
118
                                                    [% END %]
111
                                                [% END %]
119
                                                [% END %]
112
                                            </td>
120
                                            </td>
113
                                        </tr>
121
                                        </tr>
114
- 

Return to bug 18397