Bug 35499

Summary: Lost item blocked at checkin still logs a return in action logs
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, philippe.blouin
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2023-12-05 21:11:51 UTC
I found this while investigating something for a client and noticed that in the patron's modification log, an item was checked out once and checked in twice. It seems if you try to check in a lost item and BlockReturnOfLostItems is set to block, an action_log of the return is still logged (with nothing different from a log of a real checkin). I don't know if this is normal, but it doesn't feel normal.

To recreate:
1. Make sure BlockReturnOfLostItems is set to Block
2. Make sure MarkLostItemsAsReturned is set to nothing (or at least not From the items tab of the catalog module)
3. Make sure ReturnLog is set to Log
4. Check out an item to a patron
5. In the list of checkouts, click the barcode and set the status to Lost
6. Try to check in the item
   --> should be blocked and say Item is lost, cannot be checked in. ; Cannot check in ; NOT CHECKED IN
7. Go to the patron's file and click the Modification log button
   --> Note that there is a line for the return of the item
8. Go back to the item and change the status back to not lost
9. Check in the item again
   --> Should check in normally
10. Go to the patron's file > Modification log
   --> Note that there is a new line for the return of the item; both lines are identical, there is nothing that indicates one return was not successful.