Bugzilla – Attachment 48310 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 - group floating rules - added logging ALWAYS and CODITIONAL floats.
Bug-9525---group-floating-rules---added-logging-AL.patch (text/plain), 1.88 KB, created by
Olli-Antti Kivilahti
on 2016-02-23 09:54:31 UTC
(
hide
)
Description:
Bug 9525 - group floating rules - added logging ALWAYS and CODITIONAL floats.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2016-02-23 09:54:31 UTC
Size:
1.88 KB
patch
obsolete
>From 1276f688c36230e42cfb302af7c1e3808c9f7de5 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Tue, 23 Feb 2016 11:52:17 +0200 >Subject: [PATCH] Bug 9525 - group floating rules - added logging ALWAYS and > CODITIONAL floats. > >SELECT * FROM action_logs WHERE module = "FLOATING"; >--- > C4/Circulation.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 039f9b7..4d14ee0 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2041,6 +2041,21 @@ sub AddReturn { > $messages->{'NeedsTransfer'} = 1; # TODO: instead of 1, specify branchcode that the transfer SHOULD go to, $item->{homebranch} > } > } >+ #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 (($doreturn or $messages->{'NotIssued'}) >+ and !$resfound and ($branch ne $hbr) >+ 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 >+ #So first check if we already logged this operation. >+ my $logs = C4::Log::GetLogs(DateTime->now(time_zone => C4::Context->tz), >+ DateTime->now(time_zone => C4::Context->tz), >+ undef, ['FLOATING'], undef, $item->{'itemnumber'}, "$branch -> $hbr denied"); >+ if (not($logs) || (ref($logs) eq 'ARRAY' && scalar(@$logs) == 0)) { >+ C4::Log::logaction("FLOATING", $floatingType, $item->{'itemnumber'}, "$branch -> $hbr denied"); >+ } >+ } > return ( $doreturn, $messages, $issue, $borrower ); > } > >-- >1.9.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