Bugzilla – Attachment 95176 Details for
Bug 22831
Add a maintenance script for checking DB vs index counts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22831: (follow-up) Sort results, group by db
Bug-22831-follow-up-Sort-results-group-by-db.patch (text/plain), 2.04 KB, created by
Nick Clemens (kidclamp)
on 2019-11-07 18:49:31 UTC
(
hide
)
Description:
Bug 22831: (follow-up) Sort results, group by db
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-11-07 18:49:31 UTC
Size:
2.04 KB
patch
obsolete
>From 8525c9198ba013c43982d62637243382e1f0c2e9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 7 Nov 2019 18:49:12 +0000 >Subject: [PATCH] Bug 22831: (follow-up) Sort results, group by db > >--- > misc/maintenance/compare_es_to_db.pl | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > >diff --git a/misc/maintenance/compare_es_to_db.pl b/misc/maintenance/compare_es_to_db.pl >index 0173f5b170..285bd61ffa 100644 >--- a/misc/maintenance/compare_es_to_db.pl >+++ b/misc/maintenance/compare_es_to_db.pl >@@ -90,16 +90,34 @@ foreach my $index ( ('biblios','authorities') ){ > my $opac_base = C4::Context->preference('OPACBaseURL'); > > >- foreach my $problem (@diff){ >+ my @koha_problems; >+ my @es_problems; >+ foreach my $problem ( sort { $a <=> $b } @diff){ > if ( (grep /^$problem$/, @db_records) ){ >- print "Record $problem exists in Koha but not ES\n"; >+ push @koha_problems, $problem; >+ } else { >+ push @es_problems, $problem; >+ } >+ } >+ >+ if ( @koha_problems ){ >+ print "=================\n"; >+ print "Records that exist in Koha but not in ES\n"; >+ for my $problem ( @koha_problems ){ > if ( $index eq 'biblios' ) { >+ print " #$problem"; > print " Visit here to see record: $opac_base/cgi-bin/koha/opac-detail.pl?biblionumber=$problem\n"; > } elsif ( $index eq 'authorities' ) { >+ print "#$problem"; > print " Visit here to see record: $opac_base/cgi-bin/koha/opac-authoritiesdetail.pl?authid=$problem\n"; > } >- } else { >- print "Record $problem exists in ES but not Koha\n"; >+ } >+ } >+ if ( @es_problems ){ >+ print "=================\n"; >+ print "Records that exist in ES but not in Koha\n"; >+ for my $problem ( @es_problems ){ >+ print " #$problem"; > print " Enter this command to view record: curl $es_base/data/$problem?pretty=true\n"; > } > } >-- >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 22831
:
89233
|
95077
|
95105
|
95109
|
95110
|
95154
|
95155
|
95156
|
95157
|
95176
|
96804
|
96805
|
96806
|
97339
|
97340
|
97341
|
97783