Bugzilla – Attachment 140108 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.17 KB, created by
Kyle M Hall (khall)
on 2022-09-02 11:15:41 UTC
(
hide
)
Description:
Bug 7021: Catch new introductions of UpdateStats
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-09-02 11:15:41 UTC
Size:
2.17 KB
patch
obsolete
>From f4e0901ddca81f523043575450d4ef2de2073808 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 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 b9272c91bd..3f322ab6c5 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.30.2
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