Bugzilla – Attachment 189675 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
f22f9e4.patch (text/plain), 1.17 KB, created by
Martin Renvoize (ashimema)
on 2025-11-18 17:14:53 UTC
(
hide
)
Description:
Bug 40919: Remove unnecessary DB call in Koha::Item::Transfer->receive
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-18 17:14:53 UTC
Size:
1.17 KB
patch
obsolete
>From f22f9e408045a8edb4b8b55876ab7f395f5360cb 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > 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 1abc0767c25..f59a51d747b 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.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 40919
:
187143
| 189675