Bugzilla – Attachment 180616 Details for
Bug 39558
Timestamps on biblio biblioitems and biblio_metadata are not in sync
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39558: Update biblio and biblioitems timestamps explicitly
Bug-39558-Update-biblio-and-biblioitems-timestamps.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2025-04-04 08:22:09 UTC
(
hide
)
Description:
Bug 39558: Update biblio and biblioitems timestamps explicitly
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-04-04 08:22:09 UTC
Size:
1.77 KB
patch
obsolete
>From 6fce693cdafde68046a79c6a0288522fda931030 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >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 >--- > C4/Biblio.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 21cb96741a2..3f1b240ee92 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
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 39558
:
180616
|
180624
|
182319