Bug 41152

Summary: RESERVE_EXPIRED accountline should include expired hold's cancellation reason and item title when available
Product: Koha Reporter: Lari Strand <lmstrand>
Component: Fines and feesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
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:

Description Lari Strand 2025-10-31 08:17:18 UTC
When running the cronjob cancel_expired_holds.pl you can pass a cancellation reason to the script with a trigger. This reason does not get recorded in the accountline that gets generated for the fee if there's a charge/cancellation fee set. This data would be useful when printing slips/generating messages for said accountline/patron. The accountline creation happens in /Koha/Hold.pm module's cancel method.

It would also be informative to record the title of the item that caused the expired hold fee to generate into the database in the description field.

Passing a reason to the cancel_expired_holds.pl script also causes an email message to be generated for the patron with the notice with HOLD_CANCELLATION code (which does not exist in Koha by default atm. and thus does not get created and spams a 'No reserves HOLD_CANCELLATION letter transported by email' error to the cron's log instead).