Bugzilla – Attachment 78130 Details for
Bug 21231
BlockReturnofLostItems does not prevent lost items being found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21231: BlockReturnofLostItems does not prevent lost items being found
Bug-21231-BlockReturnofLostItems-does-not-prevent-.patch (text/plain), 3.73 KB, created by
Kyle M Hall (khall)
on 2018-08-24 12:11:46 UTC
(
hide
)
Description:
Bug 21231: BlockReturnofLostItems does not prevent lost items being found
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-08-24 12:11:46 UTC
Size:
3.73 KB
patch
obsolete
>From f1cabc3d925b3a39db6d22a8c7341ac5ff4ec46b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutiosn.com> >Date: Thu, 16 Aug 2018 07:11:17 -0400 >Subject: [PATCH] Bug 21231: BlockReturnofLostItems does not prevent lost items > being found > >When the syspref BlockReturnOfLostItems is set to Block, the item is blocked from being returned, but is still considered found -- it's set to lost=0 and a refund is applied to the patron (if circ rules allow). The item can then be checked in a second time and returned as it is no longer lost. > >Test Plan: >1) Set an item to lost >2) Set BlockReturnOfLostItems to Block >3) Check the lost item in >4) Checkin message should say item is lost and cannot be returned >5) Check lost status of item, it should remain unchanged > >Signed-off-by: Kyle <kyle@hall.info> >--- > C4/Circulation.pm | 4 +++- > C4/Items.pm | 14 ++++++++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 7 ++++++- > 3 files changed, 19 insertions(+), 6 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 9c14365947..6a4539dd41 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1936,7 +1936,9 @@ sub AddReturn { > UpdateHoldingbranch($branch, $item->{'itemnumber'}); > $item->{'holdingbranch'} = $branch; # update item data holdingbranch too > } >- ModDateLastSeen( $item->{'itemnumber'} ); >+ >+ my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; >+ ModDateLastSeen( $item->{itemnumber}, $leave_item_lost ); > > # check if we have a transfer for this document > my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->{'itemnumber'} ); >diff --git a/C4/Items.pm b/C4/Items.pm >index bf464c3e30..c4ca4489e2 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -645,18 +645,24 @@ sub ModItemTransfer { > > =head2 ModDateLastSeen > >- ModDateLastSeen($itemnum); >+ModDateLastSeen( $itemnumber, $leave_item_lost ); > > Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking. >-C<$itemnum> is the item number >+C<$itemnumber> is the item number >+C<$leave_item_lost> determines if a lost item will be found or remain lost > > =cut > > sub ModDateLastSeen { >- my ($itemnumber) = @_; >+ my ( $itemnumber, $leave_item_lost ) = @_; > > my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); >- ModItem( { itemlost => 0, datelastseen => $today }, undef, $itemnumber, { log_action => 0 } ); >+ >+ my $params; >+ $params->{datelastseen} = $today; >+ $params->{itemlost} = 0 unless $leave_item_lost; >+ >+ ModItem( $params, undef, $itemnumber, { log_action => 0 } ); > } > > =head2 DelItem >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index fd712f7874..ff9bce63ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -494,7 +494,12 @@ > <p class="problem">Local use recorded</p> > [% END %] > [% IF ( errmsgloo.waslost ) %] >- <p class="problem">Item was lost, now found.</p> >+ [% IF Koha.Preference('BlockReturnOfLostItems') %] >+ <p class="problem">Item is lost, cannot be checked in.</p> >+ [% ELSE %] >+ <p class="problem">Item was lost, now found.</p> >+ [% END %] >+ > [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %] > <p class="problem">A refund has been applied to the borrowing patron's account.</p> > [% ELSIF Koha.Preference('BlockReturnOfLostItems') %] >-- >2.11.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 21231
:
77892
|
77893
|
77894
|
78121
|
78122
|
78123
|
78124
|
78125
|
78126
|
78127
|
78128
|
78129
|
78130
|
78143
|
78144
|
78303
|
78304