Bug 19724 - Add timestamp to biblio_metadata and deletedbiblio_metadata
Summary: Add timestamp to biblio_metadata and deletedbiblio_metadata
Status: Pushed to Master
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:
Whiteboard:
Keywords:
: 19555 (view as bug list)
Depends on:
Blocks: 19725 19730
  Show dependency treegraph
 
Reported: 2017-12-01 13:01 UTC by Julian Maurice
Modified: 2017-12-07 14:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


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!