Bugzilla – Attachment 140698 Details for
Bug 31239
search_for_data_inconsistencies.pl fails for Koha to MARC mapping using biblio table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31239: Fix incorrect AV linked to a mapped biblio column
Bug-31239-Fix-incorrect-AV-linked-to-a-mapped-bibl.patch (text/plain), 2.03 KB, created by
Marcel de Rooy
on 2022-09-16 09:42:53 UTC
(
hide
)
Description:
Bug 31239: Fix incorrect AV linked to a mapped biblio column
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-16 09:42:53 UTC
Size:
2.03 KB
patch
obsolete
>From 3e8dd90d681c043376cb558c6be9b7ab25a69fe1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 Aug 2022 11:12:06 +0200 >Subject: [PATCH] Bug 31239: Fix incorrect AV linked to a mapped biblio column >Content-Type: text/plain; charset=utf-8 > >If an AV is linked to a MARC field mapped with a biblio column, the >search_for_data_inconsistencies.pl script might explode with > >The method Koha::Biblioitem->title is not covered by tests! > >Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 >Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x556b67fa7168)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246 > >Test plan: >For a given framework, pick a biblio using it >Link 245$a with an authorised value category >Run the script >=> Notice that with this script applied you will see the warning >=> Without this patch you got the error > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/maintenance/search_for_data_inconsistencies.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index e1526e43a5..a948b902a9 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -243,7 +243,10 @@ use C4::Biblio qw( GetMarcFromKohaField ); > my $kohafield = $v->{kohafield}; > my ( $table, $column ) = split '\.', $kohafield; > while ( my $i = $items->next ) { >- my $value = $table eq 'items' ? $i->$column : $i->biblioitem->$column; >+ my $value = >+ $table eq 'items' ? $i->$column >+ : $table eq 'biblio' ? $i->biblio->$column >+ : $i->biblioitem->$column; > $output .= " {" . $i->itemnumber . " => " . $value . "}"; > } > new_item( >-- >2.30.2
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 31239
:
138963
|
140413
| 140698 |
140699