Bugzilla – Attachment 172507 Details for
Bug 23295
Automatically debar patrons if SMS or email notice fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23295: (follow-up) Add 'NOTICE_FAILURE_SUSPENSION' as a new system restriction type
Bug-23295-follow-up-Add-NOTICEFAILURESUSPENSION-as.patch (text/plain), 2.73 KB, created by
Alex Buckley
on 2024-10-08 04:20:41 UTC
(
hide
)
Description:
Bug 23295: (follow-up) Add 'NOTICE_FAILURE_SUSPENSION' as a new system restriction type
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2024-10-08 04:20:41 UTC
Size:
2.73 KB
patch
obsolete
>From b1699c6984ac25c2ac617cc1f88b859fd0a78b1d Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Tue, 8 Oct 2024 04:20:13 +0000 >Subject: [PATCH] Bug 23295: (follow-up) Add 'NOTICE_FAILURE_SUSPENSION' as a > new system restriction type > >Sponsored-by: Catalyst IT >--- > Koha/Notice/Message.pm | 2 +- > .../bug_23295-add_system_restriction_types.pl | 18 ++++++++++++++++++ > .../en/mandatory/patron_restriction_types.yml | 5 +++++ > 3 files changed, 24 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23295-add_system_restriction_types.pl > >diff --git a/Koha/Notice/Message.pm b/Koha/Notice/Message.pm >index b94207a62e6..56798071063 100644 >--- a/Koha/Notice/Message.pm >+++ b/Koha/Notice/Message.pm >@@ -115,7 +115,7 @@ sub restrict_patron_when_notice_fails { > AddDebarment( > { > borrowernumber => $self->borrowernumber, >- type => 'SUSPENSION', >+ type => 'NOTICE_FAILURE_SUSPENSION', > comment => $comment, > expiration => undef, > } >diff --git a/installer/data/mysql/atomicupdate/bug_23295-add_system_restriction_types.pl b/installer/data/mysql/atomicupdate/bug_23295-add_system_restriction_types.pl >new file mode 100644 >index 00000000000..617b402eb1b >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23295-add_system_restriction_types.pl >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "23295", >+ description => "Automatically debar patrons if SMS or email notice fail", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ try { >+ $dbh->do(q{INSERT IGNORE INTO restriction_types (code, display_text, is_system, is_default) VALUES ('NOTICE_FAILURE_SUSPENSION', 'Notice failure suspension', 1, 0)}); >+ say_success( $out, "Added a new system restriction_types 'NOTICE_FAILURE_SUSPENSION'" ); >+ } >+ catch { >+ say_failure( $out, "Database modification failed with errors: $_" ); >+ }; >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/patron_restriction_types.yml b/installer/data/mysql/en/mandatory/patron_restriction_types.yml >index 84861458988..d8ca85b80d6 100644 >--- a/installer/data/mysql/en/mandatory/patron_restriction_types.yml >+++ b/installer/data/mysql/en/mandatory/patron_restriction_types.yml >@@ -44,3 +44,8 @@ tables: > display_text: "Discharge" > is_system: 1 > is_default: 0 >+ >+ - code: "NOTICE_FAILURE_SUSPENSION" >+ display_text: "Notice failure suspension" >+ is_system: 1 >+ is_default: 0 >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23295
:
91471
|
102068
|
102098
|
105003
|
116181
|
158687
|
160785
|
160890
|
167599
|
167778
|
172507
|
172538
|
172539
|
172540