Bug 41152 - RESERVE_EXPIRED accountline should include expired hold's cancellation reason and item title when available
Summary: RESERVE_EXPIRED accountline should include expired hold's cancellation reason...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-31 08:17 UTC by Lari Strand
Modified: 2025-10-31 08:17 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).