Bug 39985

Summary: items.onloan field is not updated when an item is recalled
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19532    
Bug Blocks:    

Description Emily Lamancusa (emlam) 2025-05-23 15:58:12 UTC
When an item is recalled, if the due date on the item should be updated due to the recall, only the issues.date_due field gets updated. The due date stored in items.onloan remains unchanged.

To replicate:
1. Enable UseRecalls syspref and set corresponding circulation rules:
    - Recalls allowed
    - Recalls per record
    - On shelf recalls allowed - set to "If any unavailable"
    - Recall due date interval - set to 1
    - Recall pickup period
2. Check out an item to a patron
3. Log into the OPAC as another patron
4. Search for the item checked out in step 2
5. Place a recall on that item
6. Search for that item in the staff interface
=> Note that the item status says, "Checked out to <patron>: due <tomorrow>"
7. Create the following SQL report in the reports module, using the barcode of the item that was recalled:
SELECT onloan FROM items WHERE barcode='xxxxxxxxx'
8. Run the report
=> The onloan value is still set to the item's original due date, not the update due date of tomorrow