Bug 41109 - Incorrect patron information when previously overdue and lost book is returned after item is marked lost when not checked out
Summary: Incorrect patron information when previously overdue and lost book is returne...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-27 15:01 UTC by Nick Clemens (kidclamp)
Modified: 2025-10-27 15:01 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 Nick Clemens (kidclamp) 2025-10-27 15:01:02 UTC
The issue is that when charging a new overdue fine, the previous fine is left as 'OVERDUE' /  'LOST' which triggers a message of 'lost_charge' which pulls the info for the latest patron to return the item. Even if the info doesn't match a lost charge, we display it

To recreate:
1 - Set the Default lost item fee refund on return policy - to 'charge' (Refund lost item charge and charge new overdue fee)
2 - Ensure circulation rule for item has fine amount and interval
3 - Set system preference WhenLostChargeReplacementFee to charge 
4 - Checkout an item with a replacement fee set, backdating a month
5 - Have syspref  DefaultLongOverdueChargeValue and DefaultLongOverdueLostValue set to same value and DefaultLongOverdueDays to 10
6 - perl misc/cronjobs/fines.pl
7 - View patron account, confirm overdue charged
8 - perl misc/cronjobs/longoverdue.pl  --confirm
9 - View patron account, confirm item lost and lost fine charged
10 - Checkin the item
11 - Check the patron's accountlines
     SELECT * FROM accountlines WHERE borrowernumber=### AND debit_type_code='OVERDUE'
12 - Note that there are two, the original with status 'LOST' and a new one with status 'FOUND'
13 - Ensure syspref  ShowAllCheckins is set to 'Show'
14 - Check out the item to another patron, and return it
15 - Mark the item lost
16 - Check it in again
17 - You see the name of the patron from step 14