Bugzilla – Attachment 123530 Details for
Bug 28799
Action logs should capture lost items found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28799: Log when item was lost and now found
Bug-28799-Log-when-item-was-lost-and-now-found.patch (text/plain), 1.52 KB, created by
Owen Leonard
on 2021-08-05 19:42:01 UTC
(
hide
)
Description:
Bug 28799: Log when item was lost and now found
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-05 19:42:01 UTC
Size:
1.52 KB
patch
obsolete
>From 7ba30782aaf4918a2d2104a5c1cdecf69d93704e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 5 Aug 2021 13:17:19 +0000 >Subject: [PATCH] Bug 28799: Log when item was lost and now found > >In the subroutine ModDateLastSeen we unset an item's lost status when >checked in. > >This routine passes a noi log parameter to the store request, this is >to avoid spamming the cataloguing log on every checkin. > >When marking an item unlost we should record this change. > >To test: >1 - Enable cataloguing log >2 - Mark an item lost >3 - View the log and confirm this chagne was recorded >4 - Check the item in >5 - The message indicates item is now found, but logs have no new entry >6 - Apply patch, restart all >7 - Mark the item lost and verify it is logged >8 - Check the item in, reported found and log entry recorded > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Items.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 11c6c1d5c4..7d294e567d 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -400,8 +400,9 @@ sub ModDateLastSeen { > > my $item = Koha::Items->find($itemnumber); > $item->datelastseen($today); >+ my $log = $item->itemlost ? 1 : 0; # If item was lost, record the change to the item > $item->itemlost(0) unless $leave_item_lost; >- $item->store({ log_action => 0, skip_record_index => $params->{skip_record_index} }); >+ $item->store({ log_action => $log, skip_record_index => $params->{skip_record_index} }); > } > > =head2 CheckItemPreSave >-- >2.20.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 28799
:
123480
|
123530
|
140831
|
140849
|
141542