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

(-)a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_notice.pl (-1 / +16 lines)
Lines 1-12 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
2
3
3
return {
4
return {
4
    bug_number  => "30295",
5
    bug_number  => "30295",
5
    description => "Add RECALL_MANUAL_CANCEL email and sms notice",
6
    description => "Adding message transports for RECALL_MANUAL_CANCEL notice",
6
    up          => sub {
7
    up          => sub {
7
        my ($args) = @_;
8
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
11
        $dbh->do(
12
            q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (14, 'Recall_Cancelled', 0) }
13
        );
14
15
        say_success( $out, "Added RECALL_MANUAL_CANCEL to message_attributes" );
16
17
        $dbh->do(
18
            q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (14, "email", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "sms", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "phone", 0, "circulation", "RECALL_MANUAL_CANCEL", null) }
19
        );
20
        say_success( $out, "Added RECALL_MANUAL_CANCEL to message_transports" );
21
10
        $dbh->do(
22
        $dbh->do(
11
            q{ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation','RECALL_MANUAL_CANCEL','','Recall has been cancelled','0','Recall has been cancelled','Dear [% borrower.firstname %] [% borrower.surname %],
23
            q{ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation','RECALL_MANUAL_CANCEL','','Recall has been cancelled','0','Recall has been cancelled','Dear [% borrower.firstname %] [% borrower.surname %],
12
24
Lines 22-26 Title: [% biblio.title %] Link Here
22
Author: [% biblio.author %]
34
Author: [% biblio.author %]
23
Location: [% branch.branchname %]','email') }
35
Location: [% branch.branchname %]','email') }
24
        );
36
        );
37
38
        say_success( $out, "Added new notice RECALL_MANUAL_CANCEL" );
39
25
    },
40
    },
26
};
41
};
(-)a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_attributes.pl (-14 lines)
Lines 1-14 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "30295",
5
    description => "Adding message attributes for RECALL_MANUAL_CANCEL",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (14, 'Recall_Cancelled', 0) }
12
        );
13
    },
14
};
(-)a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_transports.pl (-15 lines)
Lines 1-14 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "30295",
5
    description => "Adding message transports for RECALL_MANUAL_CANCEL notice",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (14, "email", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "sms", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "phone", 0, "circulation", "RECALL_MANUAL_CANCEL", null) }
12
        );
13
    },
14
};
15
- 

Return to bug 30295