Bugzilla – Attachment 69440 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), 2.04 KB, created by
Julian Maurice
on 2017-12-01 16:16:41 UTC
(
hide
)
Description:
Bug 19730: Use biblio_metadata.timestamp in export_records.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-12-01 16:16:41 UTC
Size:
2.04 KB
patch
obsolete
>From d5efbcc77e77b8bb90748635833fe89e3a1ac289 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 > >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. > >Test plan: >0. Do not apply patch >1. Run export DATE="$(date '+%F %T')" >2. Edit a biblio record, modify a field that is not mapped to a DB > column, so biblio_metadata.timestamp will be modified but not > biblioitems.timestamp >3. Run misc/export_records.pl --date="$DATE" >4. Verify that koha.mrc is empty >5. Apply patch >6. Run misc/export_records.pl --date="$DATE" >7. Verify koha.mrc contains the record you modified >--- > 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 23cc9f1109..6e363686a3 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.11.0
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