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

(-)a/Koha/Notice/Message.pm (-1 / +1 lines)
Lines 115-121 sub restrict_patron_when_notice_fails { Link Here
115
    AddDebarment(
115
    AddDebarment(
116
        {
116
        {
117
            borrowernumber => $self->borrowernumber,
117
            borrowernumber => $self->borrowernumber,
118
            type           => 'SUSPENSION',
118
            type           => 'NOTICE_FAILURE_SUSPENSION',
119
            comment        => $comment,
119
            comment        => $comment,
120
            expiration     => undef,
120
            expiration     => undef,
121
        }
121
        }
(-)a/installer/data/mysql/atomicupdate/bug_23295-add_system_restriction_types.pl (+18 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4
return {
5
    bug_number  => "23295",
6
    description => "Automatically debar patrons if SMS or email notice fail",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
        try {
11
            $dbh->do(q{INSERT IGNORE INTO restriction_types (code, display_text, is_system, is_default) VALUES ('NOTICE_FAILURE_SUSPENSION', 'Notice failure suspension', 1, 0)});
12
            say_success( $out, "Added a new system restriction_types 'NOTICE_FAILURE_SUSPENSION'" );
13
        }
14
        catch {
15
            say_failure( $out, "Database modification failed with errors: $_" );
16
        };
17
    },
18
};
(-)a/installer/data/mysql/en/mandatory/patron_restriction_types.yml (-1 / +5 lines)
Lines 44-46 tables: Link Here
44
          display_text: "Discharge"
44
          display_text: "Discharge"
45
          is_system: 1
45
          is_system: 1
46
          is_default: 0
46
          is_default: 0
47
- 
47
48
        - code: "NOTICE_FAILURE_SUSPENSION"
49
          display_text: "Notice failure suspension"
50
          is_system: 1
51
          is_default: 0

Return to bug 23295