Bugzilla – Attachment 165315 Details for
Bug 16122
Item record needs to keep local use count
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16122: Increment items.localuse
Bug-16122-Increment-itemslocaluse.patch (text/plain), 1.77 KB, created by
Lucas Gass (lukeg)
on 2024-04-22 15:35:48 UTC
(
hide
)
Description:
Bug 16122: Increment items.localuse
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-04-22 15:35:48 UTC
Size:
1.77 KB
patch
obsolete
>From e3cf3da12fd1ba4a5eb0ee164c44fbe93f3900a1 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 11 Mar 2024 23:26:17 +0000 >Subject: [PATCH] Bug 16122: Increment items.localuse > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 3 +++ > circ/circulation.pl | 5 +++++ > 2 files changed, 8 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 52f2330967..688b071514 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2144,6 +2144,7 @@ sub AddReturn { > > my $itemnumber = $item->itemnumber; > my $itemtype = $item->effective_itemtype; >+ my $localuse_count = $item->localuse || 0; > > my $issue = $item->checkout; > if ( $issue ) { >@@ -2159,6 +2160,8 @@ sub AddReturn { > # No issue, no borrowernumber. ONLY if $doreturn, *might* you have a $borrower later. > # Record this as a local use, instead of a return, if the RecordLocalUseOnReturn is on > if (C4::Context->preference("RecordLocalUseOnReturn")) { >+ $localuse_count++; >+ $item->localuse( $localuse_count )->store; > $messages->{'LocalUse'} = 1; > $stat_type = 'localuse'; > } >diff --git a/circ/circulation.pl b/circ/circulation.pl >index cb139f0f59..f5c82fdef6 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -376,6 +376,11 @@ if (@$barcodes && $op eq 'cud-checkout') { > BORROWER => $stats_borrower, > ); > } >+ >+ #increment items.localuse >+ my $localuse_count = $item->localuse; >+ $localuse_count++; >+ $item->localuse( $localuse_count )->store; > } > # Fix for bug 7494: optional checkout-time fallback search for a book > >-- >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 16122
:
149281
|
149282
|
149283
|
149284
|
150231
|
150232
|
150233
|
150234
|
150235
|
150236
|
150623
|
150693
|
153193
|
153196
|
153197
|
153198
|
153199
|
153200
|
158466
|
158467
|
158468
|
158469
|
158470
|
158471
|
161001
|
161002
|
161003
|
161004
|
161005
|
161006
|
161144
|
161145
|
161146
|
161147
|
161148
|
161149
|
161150
|
161151
|
161153
|
161154
|
161155
|
161156
|
161157
|
161158
|
161159
|
161160
|
163072
|
163073
|
163074
|
163075
|
163076
|
163077
|
163243
|
163244
|
163245
|
163246
|
163247
|
163248
|
163296
|
163297
|
163298
|
163299
|
163300
|
163301
|
163302
|
163303
|
165313
|
165314
| 165315 |
165316
|
165317
|
165318
|
165319
|
165320