Bugzilla – Attachment 135274 Details for
Bug 7021
Add patron category to the statistics table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7021: Catch new introductions of UpdateStats
Bug-7021-Catch-new-introductions-of-UpdateStats.patch (text/plain), 2.11 KB, created by
Martin Renvoize (ashimema)
on 2022-05-23 14:23:17 UTC
(
hide
)
Description:
Bug 7021: Catch new introductions of UpdateStats
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-05-23 14:23:17 UTC
Size:
2.11 KB
patch
obsolete
>From 089b4236d7419f2c8581317b7324deb837768d79 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 23 May 2022 15:21:40 +0100 >Subject: [PATCH] Bug 7021: Catch new introductions of UpdateStats > >--- > C4/Circulation.pm | 2 +- > Koha/Recalls.pm | 19 +++++++++++-------- > 2 files changed, 12 insertions(+), 9 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 37cbd6b383..c7ac1ef1cb 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2353,7 +2353,7 @@ sub AddReturn { > location => $item->location, > borrowernumber => $borrowernumber, > ccode => $item->ccode, >- categorycode => $patron->categorycode, >+ ( $patron_unblessed ? ( categorycode => $patron_unblessed->{categorycode} ) : () ), > }); > > # Send a check-in slip. # NOTE: borrower may be undef. Do not try to send messages then. >diff --git a/Koha/Recalls.pm b/Koha/Recalls.pm >index ef73bf9917..b64d58332b 100644 >--- a/Koha/Recalls.pm >+++ b/Koha/Recalls.pm >@@ -164,14 +164,17 @@ sub add_recall { > > $item = Koha::Items->find( $itemnumber ); > # add to statistics table >- C4::Stats::UpdateStats({ >- branch => C4::Context->userenv->{'branch'}, >- type => 'recall', >- itemnumber => $itemnumber, >- borrowernumber => $recall->patron_id, >- itemtype => $item->effective_itemtype, >- ccode => $item->ccode, >- }); >+ C4::Stats::UpdateStats( >+ { >+ branch => C4::Context->userenv->{'branch'}, >+ type => 'recall', >+ itemnumber => $itemnumber, >+ borrowernumber => $recall->patron_id, >+ itemtype => $item->effective_itemtype, >+ ccode => $item->ccode, >+ categorycode => $checkout->patron->categorycode >+ } >+ ); > > # add action log > C4::Log::logaction( 'RECALLS', 'CREATE', $recall->id, "Recall requested by borrower #" . $recall->patron_id, $interface ) if ( C4::Context->preference('RecallsLog') ); >-- >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 7021
:
29456
|
29508
|
122881
|
122882
|
122883
|
129119
|
129120
|
129121
|
129122
|
135269
|
135270
|
135271
|
135272
|
135273
|
135274
|
140103
|
140104
|
140105
|
140106
|
140107
|
140108
|
140109
|
140110
|
140116
|
140144
|
140845