Bugzilla – Attachment 118417 Details for
Bug 27835
Closed days offsets with one day
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27835: (follow-up) Update language, remove warn, add feedback
Bug-27835-follow-up-Update-language-remove-warn-ad.patch (text/plain), 5.92 KB, created by
Tomás Cohen Arazi
on 2021-03-17 16:20:33 UTC
(
hide
)
Description:
Bug 27835: (follow-up) Update language, remove warn, add feedback
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2021-03-17 16:20:33 UTC
Size:
5.92 KB
patch
obsolete
>From 7a11a007aeca77100d474c66c0864c436311639f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 16 Mar 2021 13:22:26 +0000 >Subject: [PATCH] Bug 27835: (follow-up) Update language, remove warn, add > feedback > >This patch: > - Updates lanugage to be clearer 'ChargeFinesOnClosedDays' vs 'ChargeFinesOnCloseDay' > - Removes a stary warn > - Add an 'updated' counter and provides feedback in fines.pl > >Test plan: > 0 - Apply patches, updatedatabase > 1 - set finesCalendar to 'ignore', ChargeFinesOnClosedDays to "Don't charge" > 2 - Checkout an item due yesterday > 3 - Ensure circ rules have a fine amount and interval set > 4 - Make today a holiday > 5 - perl misc/cronjobs/fines.pl -v > 6 - 0 updated > 7 - ChargeFinesOnClosedDays to "Charge" > 8 - perl misc/cronjobs/fines.pl -v > 9 - 1 updated >10 - set fines calendar to 'use' >11 - perl misc/cronjobs/fines.pl -v >12 - 1 updated (NOTE: This is wrong maybe, but handle on another bug) >13 - set ChargeFinesOnClosedDays to "Don't charge" >14 - perl misc/cronjobs/fines.pl -v >12 - 0 updated > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > installer/data/mysql/atomicupdate/bug_27835.perl | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/circulation.pref | 2 +- > misc/cronjobs/fines.pl | 6 ++++-- > 4 files changed, 8 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_27835.perl b/installer/data/mysql/atomicupdate/bug_27835.perl >index 5f718a9ca5e..71ceefed62a 100644 >--- a/installer/data/mysql/atomicupdate/bug_27835.perl >+++ b/installer/data/mysql/atomicupdate/bug_27835.perl >@@ -3,8 +3,8 @@ if( CheckVersion( $DBversion ) ) { > > $dbh->do(q| > INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) >- VALUES ('ChargeFinesOnCloseDay', '1', NULL, 'Charge fines on close day.', 'YesNo') >+ VALUES ('ChargeFinesOnClosedDays', '1', NULL, 'Charge fines on days the library is closed.', 'YesNo') > |); > >- NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnCloseDay"); >+ NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnClosedDays"); > } >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 3e6df3cc291..a8998787205 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -122,7 +122,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'), > ('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'), > ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), >-('ChargeFinesOnCloseDay','1',NULL,'Charge fines on close day.','YesNo') >+('ChargeFinesOnClosedDays','1',NULL,'Charge fines on days the library is closed.','YesNo') > ('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'), > ('CheckPrevCheckoutDelay','0', NULL,'Maximum number of days that will trigger a warning if the patron has borrowed that item in the past when CheckPrevCheckout is enabled.','free'), > ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), >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 b38798fc35e..9acc59f50e3 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 >@@ -970,7 +970,7 @@ Circulation: > production: Calculate and charge > - fines (when <code>cronjobs/fines.pl</code> is being run). > - '<br><strong>NOTE:</strong> If the cronjobs/fines.pl cronjob is being run, accruing and final fines will be calculated when the cron runs and accruing fines will be finalized when an item is returned. If <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CalculateFinesOnReturn">CalculateFinesOnReturn</a> is enabled, final fines will be calculated when an item is returned.<br/>' >- - pref: ChargeFinesOnCloseDay >+ - pref: ChargeFinesOnClosedDays > type: choice > choices: > 0: "Don't charge" >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index 554c30fc49d..afc6b4d5566 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -115,6 +115,7 @@ if ($filename) { > print {$fh} "\n"; > } > my $counted = 0; >+my $updated = 0; > my $params; > $params->{maximumdays} = $maxdays if $maxdays; > my $overdues = Getoverdues($params); >@@ -152,11 +153,10 @@ for my $overdue ( @{$overdues} ) { > if ( > $mode eq 'production' > && ( !$is_holiday{$branchcode} >- || C4::Context->preference('ChargeFinesOnCloseDay') ) >+ || C4::Context->preference('ChargeFinesOnClosedDays') ) > && ( $amount && $amount > 0 ) > ) > { >- warn 'charge'; > UpdateFine( > { > issue_id => $overdue->{issue_id}, >@@ -166,6 +166,7 @@ for my $overdue ( @{$overdues} ) { > due => output_pref($datedue), > } > ); >+ $updated++; > } > my $borrower = $patron->unblessed; > if ($filename) { >@@ -194,6 +195,7 @@ EOM > Number of Overdue Items: > counted $overdue_items > reported $counted >+ updated $updated > > EOM > } >-- >2.31.0
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 27835
:
118032
|
118033
|
118288
|
118289
|
118290
|
118319
|
118320
|
118321
|
118322
|
118361
|
118414
|
118415
|
118416
| 118417 |
118418