Bugzilla – Attachment 70932 Details for
Bug 19730
misc/export_records.pl should use biblio_metadata.timestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19730: Use biblio_metadata.timestamp in export_records.pl
Bug-19730-Use-bibliometadatatimestamp-in-exportrec.patch (text/plain), 3.10 KB, created by
Marcel de Rooy
on 2018-01-26 07:24:21 UTC
(
hide
)
Description:
Bug 19730: Use biblio_metadata.timestamp in export_records.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-01-26 07:24:21 UTC
Size:
3.10 KB
patch
obsolete
>From d6dbd585788ba33eb80f58b836502326d539d063 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 1 Dec 2017 15:51:16 +0000 >Subject: [PATCH] Bug 19730: Use biblio_metadata.timestamp in export_records.pl >Content-Type: text/plain; charset=utf-8 > >Since bug 17196, biblioitems.timestamp is not always updated after a >change in the MARC record. >Filtering should be based on biblio_metadata.timestamp instead. > >REVISED TEST PLAN >----------------- >0. Do not apply patch > >1. Find a biblio record, remember the biblionumber for step 3 > >2. Edit the record, modify a field (e.g. 003, 015$q) that is > not mapped to a DB column, so biblio_metadata.timestamp will > be modified but not biblioitems.timestamp > >3. In MySQL with the koha database selected: > > select timestamp from biblio where biblionumber=###; > > select timestamp from biblio_metadata where biblionumber=###; > -- you'll need to change the ###'s based on the biblionumber > you remembered in step 1. > -- the two timestamps will differ. > -- Remember the timestamp of biblio_metadata for step 4. > >4. Run this command: > $ sudo koha-shell -c bash kohadev > $ export DATE="YYYY-MM-DD HH:mm:SS" > -- use the timestamp remembered in step 3. > >5. Run this command: > $ ./misc/export_records.pl --date="$DATE" > $ ls -la koha.mrc > -- the file should be 0 bytes. > >6. Run this command: > $ exit > $ git bz apply 19730 > $ restart_all > $ sudo koha-shell -c bash kohadev > $ export DATE="YYYY-MM-DD HH:mm:SS" > -- use the timestamp remembered in step 3. > >7. Run this command: > $ ./misc/export_records.pl --date="$DATE" > $ ls -la koha.mrc > -- the file should be a lot more than 0 bytes. > >8. Run this command: > $ /home/vagrant/qa-test-tools/koha-qa.pl -v 2 -c 1 > -- this should pass. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/export_records.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index 23cc9f1..6e36368 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -104,16 +104,16 @@ if ( $record_type eq 'bibs' ) { > if ( $timestamp ) { > push @record_ids, $_->{biblionumber} for @{ > $dbh->selectall_arrayref(q| ( >- SELECT biblionumber >- FROM biblioitems >+ SELECT biblio_metadata.biblionumber >+ FROM biblio_metadata > LEFT JOIN items USING(biblionumber) >- WHERE biblioitems.timestamp >= ? >+ WHERE biblio_metadata.timestamp >= ? > OR items.timestamp >= ? > ) UNION ( >- SELECT biblionumber >- FROM biblioitems >+ SELECT biblio_metadata.biblionumber >+ FROM biblio_metadata > LEFT JOIN deleteditems USING(biblionumber) >- WHERE biblioitems.timestamp >= ? >+ WHERE biblio_metadata.timestamp >= ? > OR deleteditems.timestamp >= ? > ) |, { Slice => {} }, ( $timestamp ) x 4 ); > }; >-- >2.1.4
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 19730
:
69440
|
70851
|
70852
| 70932