Bug 41761

Summary: Updating accountlines note sets accountlines.date to current date
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Fines and feesAssignee: Lucas Gass (lukeg) <lucas>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: lucas, mteal
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 37211    
Bug Blocks:    
Attachments: Bug 41761: Do not update accountlines.date when editing a note
Bug 41761: Do not update accountlines.date when editing a note

Description Andrew Fuerste-Henry 2026-02-03 19:08:22 UTC
When updating the note in an accountline, both accountlines.timestamp and accountlines.date get updated to the current date and time. Accountlines.date is meant to remain constant as the time of creation for this entry. Updating it has a serious impact on the data.
Comment 1 Lucas Gass (lukeg) 2026-02-03 20:12:11 UTC
Created attachment 192397 [details] [review]
Bug 41761: Do not update accountlines.date when editing a note

To test:
0. APPLY PATCH, restart_all
1. Create an accountline and make note of the accountline.date
2. On that accoutnline edit the note.
3. Confirm that the accountline.date does NOT update.
Comment 2 Lucas Gass (lukeg) 2026-02-03 20:17:46 UTC
We shouldn't need to set timestamp here because on the accountlines table timestamp column we have:

`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
Comment 3 Andrew Fuerste-Henry 2026-02-03 21:58:39 UTC
Created attachment 192398 [details] [review]
Bug 41761: Do not update accountlines.date when editing a note

To test:
0. APPLY PATCH, restart_all
1. Create an accountline and make note of the accountline.date
2. On that accoutnline edit the note.
3. Confirm that the accountline.date does NOT update.

Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>