Bug 19724 - Add timestamp to biblio_metadata and deletedbiblio_metadata
Summary: Add timestamp to biblio_metadata and deletedbiblio_metadata
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Julian Maurice
QA Contact: Josef Moravec
URL:
Keywords:
: 19555 (view as bug list)
Depends on: 17196
Blocks: 19725 19730
  Show dependency treegraph
 
Reported: 2017-12-01 13:01 UTC by Julian Maurice
Modified: 2018-12-03 20:04 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata (4.21 KB, patch)
2017-12-01 13:03 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata (4.26 KB, patch)
2017-12-01 20:23 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata (4.32 KB, patch)
2017-12-04 10:58 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2017-12-01 13:01:55 UTC
Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)
Comment 1 Julian Maurice 2017-12-01 13:03:10 UTC
Created attachment 69431 [details] [review]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);
Comment 2 David Bourgault 2017-12-01 20:23:43 UTC
Created attachment 69457 [details] [review]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Comment 3 Magnus Enger 2017-12-04 08:08:54 UTC
*** Bug 19555 has been marked as a duplicate of this bug. ***
Comment 4 Josef Moravec 2017-12-04 10:58:19 UTC
Created attachment 69478 [details] [review]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Josef Moravec 2017-12-04 11:08:13 UTC
QA Comment: the function GREATEST is not "standard" but is widely implemented, so no problem here in my opinion
Comment 6 Jonathan Druart 2017-12-07 14:24:44 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2017-12-14 12:34:15 UTC
Pushed to stable for 17.11.01, awesome work all!
Comment 8 Fridolin Somers 2017-12-20 11:26:29 UTC
(In reply to Nick Clemens from comment #7)
> Pushed to stable for 17.11.01, awesome work all!

Your commit in 17.11.x is missing the update of version in Koha.pm
Comment 9 Fridolin Somers 2017-12-20 11:26:40 UTC
Pushed to 17.05.x, will be in v17.05.07
Comment 10 Fridolin Somers 2018-01-19 08:46:50 UTC
Resolved since Bug 17196 not in 16.11.x