View | Details | Raw Unified | Return to bug 22831
Collapse All | Expand All

(-)a/misc/maintenance/compare_es_to_db.pl (-5 / +22 lines)
Lines 90-105 foreach my $index ( ('biblios','authorities') ){ Link Here
90
    my $opac_base = C4::Context->preference('OPACBaseURL');
90
    my $opac_base = C4::Context->preference('OPACBaseURL');
91
91
92
92
93
    foreach my $problem (@diff){
93
    my @koha_problems;
94
    my @es_problems;
95
    foreach my $problem ( sort { $a <=> $b } @diff){
94
        if ( (grep /^$problem$/, @db_records) ){
96
        if ( (grep /^$problem$/, @db_records) ){
95
            print "Record $problem exists in Koha but not ES\n";
97
            push @koha_problems, $problem;
98
        } else {
99
            push @es_problems, $problem;
100
        }
101
    }
102
103
    if ( @koha_problems ){
104
        print "=================\n";
105
        print "Records that exist in Koha but not in ES\n";
106
        for my $problem ( @koha_problems ){
96
            if ( $index eq 'biblios' ) {
107
            if ( $index eq 'biblios' ) {
108
                print "  #$problem";
97
                print "  Visit here to see record: $opac_base/cgi-bin/koha/opac-detail.pl?biblionumber=$problem\n";
109
                print "  Visit here to see record: $opac_base/cgi-bin/koha/opac-detail.pl?biblionumber=$problem\n";
98
            } elsif ( $index eq 'authorities' ) {
110
            } elsif ( $index eq 'authorities' ) {
111
                print "#$problem";
99
                print "  Visit here to see record: $opac_base/cgi-bin/koha/opac-authoritiesdetail.pl?authid=$problem\n";
112
                print "  Visit here to see record: $opac_base/cgi-bin/koha/opac-authoritiesdetail.pl?authid=$problem\n";
100
            }
113
            }
101
        } else {
114
        }
102
            print "Record $problem exists in ES but not Koha\n";
115
    }
116
    if ( @es_problems ){
117
        print "=================\n";
118
        print "Records that exist in ES but not in Koha\n";
119
        for my $problem ( @es_problems ){
120
            print "  #$problem";
103
            print "  Enter this command to view record: curl $es_base/data/$problem?pretty=true\n";
121
            print "  Enter this command to view record: curl $es_base/data/$problem?pretty=true\n";
104
        }
122
        }
105
    }
123
    }
106
- 

Return to bug 22831