Bug 41761 - Updating accountlines note sets accountlines.date to current date
Summary: Updating accountlines note sets accountlines.date to current date
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 37211
Blocks:
  Show dependency treegraph
 
Reported: 2026-02-03 19:08 UTC by Andrew Fuerste-Henry
Modified: 2026-02-03 22:45 UTC (History)
2 users (show)

See Also:
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:


Attachments
Bug 41761: Do not update accountlines.date when editing a note (1.05 KB, patch)
2026-02-03 20:12 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41761: Do not update accountlines.date when editing a note (1.11 KB, patch)
2026-02-03 21:58 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

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