From ab478f0328a64e6593109ad6a9a680f57a34915b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 4 Apr 2025 08:17:25 +0000 Subject: [PATCH] Bug 39558: Update biblio and biblioitems timestamps explicitly This patch simply adds 'timestamp = current_timestamp()' to the SQL statements run when editing a biblio. This ensures the tables timestamps are kept in sync To test: 1 - Choose a biblio in the database and make an update to a 650 field 2 - Check the timestamps in MySQL: SELECT biblio.timestamp, biblioitems.timestamp, biblio_metadata.timestamp FROM biblio JOIN biblioitems USING (biblionumber) JOIN biblio_metadata USING (biblionumber) WHERE biblionumber=9; 3 - Note the timestamps 4 - Edit the same 650 again 5 - Check the timestamps and note that the biblio_metadata is updated, but the others are not 6 - Apply patch, restart all 7 - Update the 650 again 8 - Check the timestamps, all are updated! 9 - Sign off Signed-off-by: David Nind --- C4/Biblio.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 21cb96741a..3f1b240ee9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2648,7 +2648,8 @@ sub _koha_modify_biblio { serial = ?, seriestitle = ?, copyrightdate = ?, - abstract = ? + abstract = ?, + timestamp = current_timestamp() WHERE biblionumber = ? " ; @@ -2716,7 +2717,8 @@ sub _koha_modify_biblioitem_nonmarc { cn_sort = ?, totalissues = ?, ean = ?, - agerestriction = ? + agerestriction = ?, + timestamp = current_timestamp() where biblioitemnumber = ? "; my $sth = $dbh->prepare($query); -- 2.39.5