Bugzilla – Attachment 112936 Details for
Bug 14866
Make high holds work with different item types and number of open days
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14866: Trivial code simplification
Bug-14866-Trivial-code-simplification.patch (text/plain), 1.75 KB, created by
Jonathan Druart
on 2020-11-03 16:03:43 UTC
(
hide
)
Description:
Bug 14866: Trivial code simplification
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-03 16:03:43 UTC
Size:
1.75 KB
patch
obsolete
>From b313cde701811a3b624709965750c53ed3861f64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Nov 2020 16:57:52 +0100 >Subject: [PATCH] Bug 14866: Trivial code simplification > >--- > C4/Circulation.pm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 8fb0725e51..e482b47f9c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1329,7 +1329,6 @@ sub checkHighHolds { > > my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower ); > >- my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration'); > my $rule = Koha::CirculationRules->get_effective_rule( > { > categorycode => $borrower->{categorycode}, >@@ -1338,16 +1337,15 @@ sub checkHighHolds { > rule_name => 'decreaseloanholds', > } > ); >- my $reduced_datedue; >+ > my $duration; > if ( defined($rule) && $rule->rule_value ne '' ){ > # overrides decreaseLoanHighHoldsDuration syspref > $duration = $rule->rule_value; >- $reduced_datedue = $calendar->addDate( $issuedate, $rule->rule_value ); > } else { >- $duration = $decreaseLoanHighHoldsDuration; >- $reduced_datedue = $calendar->addDate( $issuedate, $decreaseLoanHighHoldsDuration ); >+ $duration = C4::Context->preference('decreaseLoanHighHoldsDuration'); > } >+ my $reduced_datedue = $calendar->addDate( $issuedate, $duration ); > $reduced_datedue->set_hour($orig_due->hour); > $reduced_datedue->set_minute($orig_due->minute); > $reduced_datedue->truncate( to => 'minute' ); >-- >2.20.1
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 14866
:
42751
|
58324
|
75861
|
75862
|
75863
|
103323
|
103427
|
110149
|
110224
|
110441
|
111937
|
111938
|
112225
|
112226
| 112936