Bug 30478

Summary: Unexpected behavior in patrons' accounts when un-losing items via batch item modification
Product: Koha Reporter: Sara Brown <sbrown>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: 21.05   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29331
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31031
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Sara Brown 2022-04-06 19:47:49 UTC
If circulation rules allow refunds on returns and MarkLostItemsAsReturned is set to return from batch mod, an item that is charged as Lost to a patron's account will have the replacement fee removed if that item is un-lost through batch item modification. Additionally, if the item is still checked out, it will be returned/removed from their account. 

Scenario 1:
-Set 'Lost item fee refund on return policy' to 'Refund lost item charge'
-Set MarkLostItemsAsReturned to 'from the batch item modification tool'
-Check item out to patron
-Lose item from Items tab (items are *not* returned when marked lost on Items tab per MarkLostItemsAsReturned)
-In patron's account, verify that item is still checked out to patron with lost status applied, and that replacement fee is charged to their account
-In bib, verify that item shows as Lost and checked out
-In Batch Item Modification, delete lost status (no other changes made)
-In patron's account, note that item is no longer checked out and the replacement fee has been removed. The Accounts tab indicates that the item was returned.
-In bib, item status is Lost but the item is no longer marked as checked out.

Scenario 2:
-Set 'Lost item fee refund on return policy' to 'Refund lost item charge'
-Set MarkLostItemsAsReturned to 'from the batch item modification tool' and 'from the items tab of the catalog module'
-Check item out to patron
-Lose item from Items tab
-In patron's account, verify that item is no longer checked out, and that replacement fee is charged to their account
-In bib, verify that item shows as Lost but not checked out
-In Batch Item Modification, delete lost status (no other changes made)
-In patron's account, note that the replacement fee has been removed. The Accounts tab indicates that the item was returned.
-In bib, item status is Available