Bugzilla – Attachment 187143 Details for
Bug 40919
Unnecessary DB access in Koha::Item::Transfer->receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40919: Remove unnecessary DB call in Koha::Item::Transfer->receive
Bug-40919-Remove-unnecessary-DB-call-in-KohaItemTr.patch (text/plain), 1.10 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-09-30 22:29:45 UTC
(
hide
)
Description:
Bug 40919: Remove unnecessary DB call in Koha::Item::Transfer->receive
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-09-30 22:29:45 UTC
Size:
1.10 KB
patch
obsolete
>From a5380fd233d3a76bb8cf230645e18923a1d53c87 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Tue, 30 Sep 2025 19:26:43 -0300 >Subject: [PATCH] Bug 40919: Remove unnecessary DB call in > Koha::Item::Transfer->receive > >This patch removes a trivially not required DB object instantiation. >This implies saving CPU usage for the instantiation and algo for >fetching from the DB. > >To test: >1. Run: > $ ktd --shell > k$ prove t/db_dependent/Koha/Item/Transfer.t >=> SUCCESS: Tests pass! They cover ->receive() >2. Apply this patch >3. Repeat 1 >=> SUCCESS: No behavior change, tests pass! >4. Sign off :-D >--- > Koha/Item/Transfer.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm >index 1abc0767c2..f59a51d747 100644 >--- a/Koha/Item/Transfer.pm >+++ b/Koha/Item/Transfer.pm >@@ -175,7 +175,7 @@ sub receive { > # Update the arrived date > $self->set( { datearrived => dt_from_string } )->store; > >- ModDateLastSeen( $self->item->itemnumber ); >+ ModDateLastSeen( $self->itemnumber ); > return $self; > } > >-- >2.51.0
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 40919
: 187143