Bugzilla – Attachment 181530 Details for
Bug 39749
RestrictPatronsWithFailedNotices should not trigger for DUPLICATE_MESSAGE failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39749: RestrictPatronsWithFailedNotices should not trigger for DUPLICATE_MESSAGE failures
Bug-39749-RestrictPatronsWithFailedNotices-should-.patch (text/plain), 1.95 KB, created by
Kyle M Hall (khall)
on 2025-04-25 14:29:35 UTC
(
hide
)
Description:
Bug 39749: RestrictPatronsWithFailedNotices should not trigger for DUPLICATE_MESSAGE failures
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-04-25 14:29:35 UTC
Size:
1.95 KB
patch
obsolete
>From 804375df3ad969def6d2d265cb33f19980101879 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 25 Apr 2025 10:26:13 -0400 >Subject: [PATCH] Bug 39749: RestrictPatronsWithFailedNotices should not > trigger for DUPLICATE_MESSAGE failures > >Koha is built to prevent sending duplicate notices. Notices with static language ( e.g. "You have one or more holds ready to pick up" ) will easily trigger this filter. > >RestrictPatronsWithFailedNotices should ignore these notices because they do not indicate any problem with contacting the patron. > >Test Plan: >1) Enable RestrictPatronsWithFailedNotices >2) Enqueue to identical notices for a patron >3) Run process message queue to send one and fail the other as a > duplicate ( alternately, just modify them in the database ) >4) Run restrict_patrons_with_failed_notices.pl >5) Note the restriction >6) Remove the restriction >7) Apply this patch >8) Run restrict_patrons_with_failed_notices.pl >9) Note that no restriction was created! >--- > misc/cronjobs/restrict_patrons_with_failed_notices.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/misc/cronjobs/restrict_patrons_with_failed_notices.pl b/misc/cronjobs/restrict_patrons_with_failed_notices.pl >index 86178e1b02a..e86ed6a07a0 100755 >--- a/misc/cronjobs/restrict_patrons_with_failed_notices.pl >+++ b/misc/cronjobs/restrict_patrons_with_failed_notices.pl >@@ -64,6 +64,9 @@ if ( C4::Context->preference('RestrictPatronsWithFailedNotices') ) { > unless ( $failed_notice->message_transport_type eq 'sms' > || $failed_notice->message_transport_type eq 'email' ); > >+ # Messages failed for being duplicates do not indicate an issue with contacting the patron >+ next if $failed_notice->failure_code eq 'DUPLICATE_MESSAGE'; >+ > # If failed sms or email notice has no recipient patron then skip to next failed > # notice > next unless $failed_notice->borrowernumber; >-- >2.39.5 (Apple Git-154)
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 39749
: 181530 |
182597