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

(-)a/C4/Letters.pm (-1 / +3 lines)
Lines 1293-1299 sub _get_unsent_messages { Link Here
1293
1293
1294
    my $dbh = C4::Context->dbh();
1294
    my $dbh = C4::Context->dbh();
1295
    my $statement = qq{
1295
    my $statement = qq{
1296
        SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code
1296
        SELECT mq.message_id, mq.borrowernumber, mq.subject, mq.content, mq.message_transport_type, mq.status, mq.time_queued, mq.from_address, mq.reply_address, mq.to_address, mq.content_type, b.branchcode, mq.letter_code, mq.failure_code, mq.letter_id
1297
        FROM message_queue mq
1297
        FROM message_queue mq
1298
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1298
        LEFT JOIN borrowers b ON b.borrowernumber = mq.borrowernumber
1299
        WHERE status = ?
1299
        WHERE status = ?
Lines 1465-1472 sub _send_message_by_email { Link Here
1465
        } else {
1465
        } else {
1466
            $email = Koha::Email->create($params);
1466
            $email = Koha::Email->create($params);
1467
            if ($is_html) {
1467
            if ($is_html) {
1468
                $content .= "<br/>$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1468
                $email->html_body( _wrap_html( $content, $subject ) );
1469
                $email->html_body( _wrap_html( $content, $subject ) );
1469
            } else {
1470
            } else {
1471
                $content .= "\n$message->{letter_id}" if $message->{id} && C4::Context->preference('SendLetterIdInEmailNotices');
1470
                $email->text_body($content);
1472
                $email->text_body($content);
1471
            }
1473
            }
1472
        }
1474
        }
(-)a/installer/data/mysql/atomicupdate/bug_31627.pl (+14 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "31627",
5
    description => "Add syspref SendLetterIdInEmailNotices",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo')
12
        });
13
    },
14
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 699-704 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
699
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
699
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
700
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
700
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
701
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
701
('SendAllEmailsTo','',NULL,'All emails will be redirected to this email if it is not empty','free'),
702
('SendLetterIdInEmailNotices','0',NULL,'Add template id to bottom of emailed notices','YesNo'),
702
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
703
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
703
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
704
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
704
('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
705
('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +6 lines)
Lines 184-189 Patrons: Link Here
184
               1: Notify
184
               1: Notify
185
               0: "Don't notify"
185
               0: "Don't notify"
186
         - patrons whenever their password is changed.
186
         - patrons whenever their password is changed.
187
     -
188
         - pref: SendLetterIdInEmailNotices
189
           choices:
190
               1: Add
191
               0: "Don't add"
192
         - the template id for a notice to the bottom of any emailed notices.
187
     -
193
     -
188
         - pref: UseEmailReceipts
194
         - pref: UseEmailReceipts
189
           choices:
195
           choices:
190
- 

Return to bug 31627