Bugzilla – Attachment 194100 Details for
Bug 41371
Title should be recorded to accountlines.description when expired reservation fee is created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41371: Record biblio title to RESERVE_EXPIRED accountline description
Bug-41371-Record-biblio-title-to-RESERVEEXPIRED-ac.patch (text/plain), 2.60 KB, created by
Lari Strand
on 2026-02-27 12:44:29 UTC
(
hide
)
Description:
Bug 41371: Record biblio title to RESERVE_EXPIRED accountline description
Filename:
MIME Type:
Creator:
Lari Strand
Created:
2026-02-27 12:44:29 UTC
Size:
2.60 KB
patch
obsolete
>From fbc7f6f615a6387d7922d62cb7827339f77d1810 Mon Sep 17 00:00:00 2001 >From: lmstrand <lmstrand@gmail.com> >Date: Thu, 16 Oct 2025 13:21:48 +0300 >Subject: [PATCH] Bug 41371: Record biblio title to RESERVE_EXPIRED accountline > description > >To test: > >1. Find an expired reserve or create one by manipulating the reserves.expirationdate value in the database. Make a note of the borrowernumber. >2. Check that the circulation and fine rules has an expired hold charge configured for the tested reserve's itemtype >3. Run cancel_expired_holds.pl -cronscript >4. Note that the created accountline's description is empty either by checking transactions from patron's accounting tab or from database (select * from accountlines where debit_type_code = 'RESERVE_EXPIRED' and borrowernumber = x) >5. Apply patch >6. Repeat steps 1 and 2 >7. Note that the created accountline's description now includes the expired reserve's item's bibliographic record's title either by checking transactions from patron's accounting tab or from database (select * from accountlines where debit_type_code = 'RESERVE_EXPIRED' and borrowernumber = x) > >Sponsored-by: Koha-Suomi Oy >--- > Koha/Hold.pm | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index d886f7d8b5..36acf38b61 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -941,15 +941,17 @@ sub cancel { > } > ); > >+ my $description = $self->biblio ? $self->biblio->title : ''; > my $account = Koha::Account->new( { patron_id => $self->borrowernumber } ); > $account->add_debit( > { >- amount => $charge, >- user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef, >- interface => C4::Context->interface, >- library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, >- type => 'RESERVE_EXPIRED', >- item_id => $self->itemnumber >+ amount => $charge, >+ user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef, >+ interface => C4::Context->interface, >+ library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, >+ type => 'RESERVE_EXPIRED', >+ item_id => $self->itemnumber, >+ description => $description > } > ) if $charge; > } >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41371
: 194100