Bugzilla – Attachment 141875 Details for
Bug 31437
ModItemTransfer triggers indexing twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen
Bug-31437-bug-30718-follow-up-Prevent-useless-inde.patch (text/plain), 1.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-10-14 12:23:35 UTC
(
hide
)
Description:
Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-10-14 12:23:35 UTC
Size:
1.18 KB
patch
obsolete
>From 5d0acb217a2ce933b55d098d78de1737012f7a67 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 14 Oct 2022 11:04:40 +0200 >Subject: [PATCH] Bug 31437: (bug 30718 follow-up) Prevent useless indexation > call from ModDateLastSeen > >Koha::Object->store is triggering an UPDATE because the datelastseen is >different than the value in DB (comparing a datetime with a date) > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Items.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index a34527d51d9..9d443bb6ec4 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -400,7 +400,7 @@ sub ModDateLastSeen { > my ( $itemnumber, $leave_item_lost, $params ) = @_; > > my $item = Koha::Items->find($itemnumber); >- $item->datelastseen(dt_from_string); >+ $item->datelastseen(dt_from_string->ymd); > my $log = $item->itemlost && !$leave_item_lost ? 1 : 0; # If item was lost, record the change to the item > $item->itemlost(0) unless $leave_item_lost; > $item->store({ log_action => $log, skip_record_index => $params->{skip_record_index}, skip_holds_queue => $params->{skip_holds_queue} }); >-- >2.34.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 31437
:
141866
|
141867
|
141874
| 141875