Bugzilla – Attachment 68015 Details for
Bug 19016
Add a script to fix corrupted data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19016: Trigger reindex on fixing biblios
Bug-19016-Trigger-reindex-on-fixing-biblios.patch (text/plain), 1.62 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-10-12 14:59:56 UTC
(
hide
)
Description:
Bug 19016: Trigger reindex on fixing biblios
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-10-12 14:59:56 UTC
Size:
1.62 KB
patch
obsolete
>From 94429afcde03f43f5fb2e5eca00eb1b940b21ed2 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 11 Oct 2017 15:58:31 -0300 >Subject: [PATCH] Bug 19016: Trigger reindex on fixing biblios > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > misc/cronjobs/cleanup_database.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl >index 54ffcf2..336f33b 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -34,6 +34,7 @@ BEGIN { > eval { require "$FindBin::Bin/../kohalib.pl" }; > } > >+use C4::Biblio; > use C4::Context; > use C4::Search; > use C4::Search::History; >@@ -531,6 +532,10 @@ sub FixCorruptedData { > $dbh->do( q|UPDATE tmp_holdsqueue SET biblionumber = ? WHERE biblionumber = ?|, undef, $max, $old_id ); > $dbh->do( q|UPDATE suggestions SET biblionumber = ? WHERE biblionumber = ?|, undef, $max, $old_id ); > $dbh->do( q|UPDATE linktracker SET biblionumber = ? WHERE biblionumber = ?|, undef, $max, $old_id ); >+ # Delete old record from index >+ C4::Biblio::ModZebra( $old_id, 'recordDelete', 'biblioserver' ); >+ # Add/Update new record >+ C4::Biblio::ModZebra( $max, 'specialUpdate', 'biblioserver' ); > } elsif ( $table eq 'items' ) { > $dbh->do( q|UPDATE collections_tracking SET itemnumber = ? WHERE itemnumber = ?|, undef, $max, $old_id ); > $dbh->do( q|UPDATE import_items SET itemnumber = ? WHERE itemnumber = ?|, undef, $max, $old_id ); >-- >2.7.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 19016
:
65402
|
65403
|
65456
|
65710
| 68015