Bugzilla – Attachment 141867 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.12 KB, created by
Jonathan Druart
on 2022-10-14 09:07:35 UTC
(
hide
)
Description:
Bug 31437: (bug 30718 follow-up) Prevent useless indexation call from ModDateLastSeen
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-10-14 09:07:35 UTC
Size:
1.12 KB
patch
obsolete
>From c9a03b61dd8ea6862df8d348160b41b836500385 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) >--- > 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.25.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