Bug 42038

Summary: Item Search for Claims Returned Fails if item has two lost statues, Claim was never logged
Product: Koha Reporter: Danielle M. <dmeininger591>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: andrew, dmeininger591
Version: 25.05   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 27919    
Bug Blocks:    

Description Danielle M. 2026-03-09 16:26:28 UTC
To replicate:

1. Check out an item
2. Change status to Long Lost
3. Submit a claims returned for that item
4. Look at the modification log and notice the claims returned was not logged
5. Use item search with the parameter Lost = Claims Returned
6. Notice the item does not appear in the results
7. Re-do the search with the parameter Lost = Claims Returned and Long Lost
8. Notice the item now appears

It seems like Koha is not logging the second lost status (claims returned) and not able to search for claims returned only when an item also has a second lost status.
Comment 1 Andrew Fuerste-Henry 2026-03-09 17:34:13 UTC
Bug 27919 set this behavior explicitly. Marking an item Claims Returned does not change the lost status if the item is already lost so there's no change to the item record to record in the item modification log and the item appears in item search only when you search for the lost status it was given before being claimed (in your step 7, you should also find the item if you search for *only* Long Lost).

This seems like it's be one enhancement to create an actual claims returned log and/or another enhancement to give item search a way to filter to items associated with an active claim (regardless of lost status).