Bugzilla – Attachment 90119 Details for
Bug 13958
Add a suspensionsCalendar syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13958: Use SuspensionsCalendar syspref for more granularity
Bug-13958-Use-SuspensionsCalendar-syspref-for-more.patch (text/plain), 2.42 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-05-27 15:20:56 UTC
(
hide
)
Description:
Bug 13958: Use SuspensionsCalendar syspref for more granularity
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-05-27 15:20:56 UTC
Size:
2.42 KB
patch
obsolete
>From fa98a8ba5b04fc80e0ec607e3e32bb1c083f0bf8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 27 May 2019 12:10:57 -0300 >Subject: [PATCH] Bug 13958: Use SuspensionsCalendar syspref for more > granularity >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch makes the calculation of suspension expiration configuration >detached from the finesCalendar syspref. This way libraries have more >flexibility when setting circ rules. > >I wrote this path as a bugfix, because the recent change pushed by bug 19204 >changed this behavior and libraries have been complaining since they got >upgraded. > >It is a minor change, just adding the new syspref, and replacing the >single place in which it is used for debarment calculation for the new >one. > >The tests are updated similarly, just adding the new mocked syspref as >it was with the old one. > >To test: >- Apply this patches >- updatedatabase >- Run: > $ kshell > k$ prove t/db_dependent/Circulation.t >=> SUCCESS: Tests pass! >- Sign off :-D > >Sponsored-by: Universidad Nacional de Córdoba >--- > C4/Circulation.pm | 2 +- > t/db_dependent/Circulation.t | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e1b0ed6348..dbbdae9527 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2281,7 +2281,7 @@ sub _debar_user_on_return { > > my $new_debar_dt; > # Use the calendar or not to calculate the debarment date >- if ( C4::Context->preference('finesCalendar') eq 'noFinesWhenClosed' ) { >+ if ( C4::Context->preference('SuspensionsCalendar') eq 'noSuspensionsWhenClosed' ) { > my $calendar = Koha::Calendar->new( > branchcode => $branchcode, > days_mode => 'Calendar' >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 54b3c78eaa..f1eb1c7180 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1850,6 +1850,7 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { > $rule->suspension_chargeperiod(1)->store; > $rule->firstremind(0)->store; > t::lib::Mocks::mock_preference('finesCalendar', 'noFinesWhenClosed'); >+ t::lib::Mocks::mock_preference('SuspensionsCalendar', 'noSuspensionsWhenClosed'); > > # Adding a holiday 2 days ago > my $calendar = C4::Calendar->new(branchcode => $library->{branchcode}); >-- >2.21.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 13958
:
90118
|
90119
|
95131
|
95132