Bugzilla – Attachment 95343 Details for
Bug 23846
Handle records with broken MARCXML on the bibliographic detail view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23846: Add a check to the data inconsistencies script
Bug-23846-Add-a-check-to-the-data-inconsistencies-.patch (text/plain), 2.16 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-11-12 17:57:22 UTC
(
hide
)
Description:
Bug 23846: Add a check to the data inconsistencies script
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-11-12 17:57:22 UTC
Size:
2.16 KB
patch
obsolete
>From 3f1816603b020c5903e4ca7eb22b35ba10462e60 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Nov 2019 11:15:46 +0100 >Subject: [PATCH] Bug 23846: Add a check to the data inconsistencies script > >This may be quite long for big catalogue, but I think it is a good one >to have. > >Test plan: >Same as first patch, then execute search_for_data_inconsistencies.pl >Notice the error. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../search_for_data_inconsistencies.pl | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index fa5aa20ba3..3fc6eceb20 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -19,6 +19,7 @@ use Modern::Perl; > > use Koha::Script; > use Koha::Items; >+use Koha::Biblios; > use Koha::Biblioitems; > use Koha::ItemTypes; > use Koha::Authorities; >@@ -106,6 +107,18 @@ use Koha::Authorities; > new_hint("The biblioitems must have a itemtype value that is defined in the item types of Koha (Home ⺠Administration ⺠Item types administration)"); > } > } >+ >+ my @decoding_errors; >+ my $biblios = Koha::Biblios->search; >+ while ( my $biblio = $biblios->next ) { >+ eval{$biblio->metadata->record;}; >+ push @decoding_errors, $@ if $@; >+ } >+ if ( @decoding_errors ) { >+ new_section("Bibliographic records have invalid MARCXML"); >+ new_item($_) for @decoding_errors; >+ new_hint("The bibliographic records must have a valid MARCXML or you will face encoding issues or wrong displays"); >+ } > } > > sub new_section { >@@ -140,5 +153,5 @@ Catch data inconsistencies in Koha database > * if item types are defined at item level (item-level_itypes=specific item), > then items.itype must be set else biblioitems.itemtype must be set > * Item types defined in items or biblioitems must be defined in the itemtypes table >- >+* Invalid MARCXML in bibliographic records > =cut >-- >2.24.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 23846
:
94419
|
94420
|
95291
|
95292
|
95329
|
95330
|
95340
|
95341
|
95342
| 95343 |
95344