Bugzilla – Attachment 60593 Details for
Bug 18161
Option to completely disable advance notice on loans with auto renewal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Option for disabling advance notice when auto_renew is set on item that is due soon
Option-for-disabling-advance-notice-when-autorenew.patch (text/plain), 3.00 KB, created by
Stefan Berndtsson
on 2017-02-23 12:10:43 UTC
(
hide
)
Description:
Option for disabling advance notice when auto_renew is set on item that is due soon
Filename:
MIME Type:
Creator:
Stefan Berndtsson
Created:
2017-02-23 12:10:43 UTC
Size:
3.00 KB
patch
obsolete
>From d5623c9c1c50f12b8b6aa495e6b0aad2ca5dd7ae Mon Sep 17 00:00:00 2001 >From: Stefan Berndtsson <stefan.berndtsson@gmail.com> >Date: Thu, 23 Feb 2017 13:07:18 +0100 >Subject: [PATCH] Option for disabling advance notice when auto_renew is set on > item that is due soon > >https://bugs.koha-community.org/show_bug.cgi?id=18161 >--- > .../bug_18161-no-advance-notices-when-auto-renew-syspref.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > misc/cronjobs/advance_notices.pl | 1 + > 3 files changed, 8 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_18161-no-advance-notices-when-auto-renew-syspref.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_18161-no-advance-notices-when-auto-renew-syspref.sql b/installer/data/mysql/atomicupdate/bug_18161-no-advance-notices-when-auto-renew-syspref.sql >new file mode 100644 >index 0000000..df72f99 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_18161-no-advance-notices-when-auto-renew-syspref.sql >@@ -0,0 +1 @@ >+INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('NoAdvanceNoticeWhenAutoRenewal', '0', '', 'Disable advance notices when auto renew was used', 'YesNo'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index dfbcd8d..e857370 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -260,6 +260,12 @@ Circulation: > Calendar: the calendar to skip all days the library is closed. > Datedue: the calendar to push the due date to the next open day > - >+ - pref: NoAdvanceNoticeWhenAutoRenewal >+ choices: >+ yes: Do not send >+ no: Send >+ - advance notice when loan was automatically renewable when issued. >+ - > - Calculate "No renewal before" based on > - pref: NoRenewalBeforePrecision > choices: >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 855492e..7f1cd3e 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -278,6 +278,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { > message_name => 'advance_notice' } ); > next UPCOMINGITEM unless $borrower_preferences && exists $borrower_preferences->{'days_in_advance'}; > next UPCOMINGITEM unless $borrower_preferences->{'days_in_advance'} == $upcoming->{'days_until_due'}; >+ next UPCOMINGITEM if C4::Context->preference('NoAdvanceNoticeWhenAutoRenewal') && $upcoming->{'auto_renew'}; > > if ( $borrower_preferences->{'wants_digest'} ) { > # cache this one to process after we've run through all of the items. >-- >2.7.4
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 18161
: 60593