Bugzilla – Attachment 100421 Details for
Bug 9525
Add option to define float groups and rules for float
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9525: Fixing floating on return
0001-Bug-9525-Fixing-floating-on-return.patch (text/plain), 2.75 KB, created by
Emmi Takkinen
on 2020-03-10 08:46:42 UTC
(
hide
)
Description:
Bug 9525: Fixing floating on return
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-03-10 08:46:42 UTC
Size:
2.75 KB
patch
obsolete
>From f0e726474a09f8a06b1f00e2624848bd7dea26fe Mon Sep 17 00:00:00 2001 >From: Johanna Raisa <johanna.raisa@gmail.com> >Date: Mon, 25 Sep 2017 14:21:29 +0300 >Subject: [PATCH 1/2] Bug 9525: Fixing floating on return > >--- > C4/Circulation.pm | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 92c013318a..a8b2add6ae 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2133,12 +2133,14 @@ sub AddReturn { > > my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch); > # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer >- if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE')){ >+ if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} and (not $floatingType || $floatingType eq 'POSSIBLE')){ > my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; >- if ( not($floatingType && $floatingType eq 'POSSIBLE') and >- (C4::Context->preference("AutomaticItemReturn" ) or >- (C4::Context->preference("UseBranchTransferLimits") and >- ! IsBranchTransferAllowed($branch, $returnbranch, $item->$BranchTransferLimitsType ))) >+ if ( not ($floatingType && $floatingType eq 'POSSIBLE') and >+ ( >+ C4::Context->preference("AutomaticItemReturn") or >+ (C4::Context->preference("UseBranchTransferLimits") and >+ ! IsBranchTransferAllowed($branch, $returnbranch, $item->{C4::Context->preference("BranchTransferLimitsType")} )) >+ ) > ) > { > $debug and warn sprintf "about to call ModItemTransfer(%s, %s, %s)", $item->{'itemnumber'},$branch, $returnbranch; >@@ -2152,7 +2154,7 @@ sub AddReturn { > #This elsif-clause copypastes the upper if-clause. This is horrible and I cry, but cannot refactor this mess now :( due to Koha upstream master stuff looming. > elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) > and !$resfound and ($branch ne $returnbranch) >- and not($messages->{'WrongTransfer'}) >+ and not $messages->{'WrongTransfer'} > && $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it. > #We can infer that the transfer was averted because of a floating rule. > #Make sure we dont log the same floating denial multiple times >-- >2.17.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 9525
:
40077
|
40102
|
40103
|
44754
|
44756
|
44760
|
48310
|
100420
|
100421
|
100422
|
100741
|
100742
|
100743
|
103828
|
103829
|
103830
|
103831
|
112550
|
112551
|
112552
|
112553
|
124825
|
124826
|
124827
|
133071
|
133072
|
133073
|
139024
|
139025
|
139026
|
143740
|
143741
|
143742
|
143743
|
150241
|
150242
|
150243
|
150244
|
150245
|
150246
|
156330
|
156331
|
156332
|
156333
|
156334
|
156335
|
156336