Bugzilla – Attachment 94778 Details for
Bug 23382
Issuing rules failing after bug 20912
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23382: (follow-up) Clarify variable names
Bug-23382-follow-up-Clarify-variable-names.patch (text/plain), 4.66 KB, created by
Nick Clemens (kidclamp)
on 2019-10-25 14:40:51 UTC
(
hide
)
Description:
Bug 23382: (follow-up) Clarify variable names
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-10-25 14:40:51 UTC
Size:
4.66 KB
patch
obsolete
>From 25f03824f3bfc43f97f841ffade557075052db68 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 19 Sep 2019 14:48:45 +0100 >Subject: [PATCH] Bug 23382: (follow-up) Clarify variable names > >This patch updates the variable name '$branch' to '$branchcode' in a >number of places to make it clearer what the variable contains. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Circulation.pm | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 4f49011a0b..5880abe691 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1178,7 +1178,7 @@ sub CanBookBeReturned { > > sub checkHighHolds { > my ( $item, $borrower ) = @_; >- my $branch = _GetCircControlBranch( $item, $borrower ); >+ my $branchcode = _GetCircControlBranch( $item, $borrower ); > my $item_object = Koha::Items->find( $item->{itemnumber} ); > > my $return_data = { >@@ -1236,10 +1236,10 @@ sub checkHighHolds { > > my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); > >- my $calendar = Koha::Calendar->new( branchcode => $branch ); >+ my $calendar = Koha::Calendar->new( branchcode => $branchcode ); > > my $itype = $item_object->effective_itemtype; >- my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branch, $borrower ); >+ my $orig_due = C4::Circulation::CalcDateDue( $issuedate, $itype, $branchcode, $borrower ); > > my $decreaseLoanHighHoldsDuration = C4::Context->preference('decreaseLoanHighHoldsDuration'); > >@@ -1329,7 +1329,7 @@ sub AddIssue { > or return; # if we don't get an Item, abort. > my $item_unblessed = $item_object->unblessed; > >- my $branch = _GetCircControlBranch( $item_unblessed, $borrower ); >+ my $branchcode = _GetCircControlBranch( $item_unblessed, $borrower ); > > # get actual issuing if there is one > my $actualissue = $item_object->checkout; >@@ -1340,7 +1340,7 @@ sub AddIssue { > $datedue = AddRenewal( > $borrower->{'borrowernumber'}, > $item_object->itemnumber, >- $branch, >+ $branchcode, > $datedue, > $issuedate, # here interpreted as the renewal date > ); >@@ -1348,13 +1348,13 @@ sub AddIssue { > else { > unless ($datedue) { > my $itype = $item_object->effective_itemtype; >- $datedue = CalcDateDue( $issuedate, $itype, $branch, $borrower ); >+ $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower ); > > } > $datedue->truncate( to => 'minute' ); > > my $patron = Koha::Patrons->find( $borrower ); >- my $library = Koha::Libraries->find( $branch ); >+ my $library = Koha::Libraries->find( $branchcode ); > my $fees = Koha::Charges::Fees->new( > { > patron => $patron, >@@ -1395,7 +1395,7 @@ sub AddIssue { > my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule( > { categorycode => $borrower->{categorycode}, > itemtype => $item_object->effective_itemtype, >- branchcode => $branch >+ branchcode => $branchcode > } > ); > >@@ -1405,7 +1405,7 @@ sub AddIssue { > # Record in the database the fact that the book was issued. > unless ($datedue) { > my $itype = $item_object->effective_itemtype; >- $datedue = CalcDateDue( $issuedate, $itype, $branch, $borrower ); >+ $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower ); > > } > $datedue->truncate( to => 'minute' ); >@@ -1505,7 +1505,7 @@ sub AddIssue { > # Send a checkout slip. > my $circulation_alert = 'C4::ItemCirculationAlertPreference'; > my %conditions = ( >- branchcode => $branch, >+ branchcode => $branchcode, > categorycode => $borrower->{categorycode}, > item_type => $item_object->effective_itemtype, > notification => 'CHECKOUT', >@@ -1516,7 +1516,7 @@ sub AddIssue { > type => 'CHECKOUT', > item => $item_object->unblessed, > borrower => $borrower, >- branch => $branch, >+ branch => $branchcode, > } > ); > } >-- >2.11.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 23382
:
92221
|
92222
|
92236
|
92237
|
92238
|
92273
|
92274
|
92275
|
92276
|
93407
|
93408
|
93409
|
93410
|
93411
|
93412
|
94281
|
94282
|
94283
|
94284
|
94285
|
94286
|
94287
|
94288
|
94289
|
94723
|
94724
|
94725
|
94726
|
94727
|
94728
|
94729
|
94730
|
94731
|
94743
|
94755
|
94756
|
94757
|
94758
|
94759
|
94760
|
94761
|
94762
|
94763
|
94764
|
94765
|
94766
|
94774
|
94775
|
94776
|
94777
| 94778 |
94779
|
94780
|
94781
|
94782
|
94783
|
94784
|
107456
|
107457