Bugzilla – Attachment 138713 Details for
Bug 31299
Duplicate output in search_for_data_inconsistencies.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl
Bug-31299-Fix-duplicate-output-in-searchfordatainc.patch (text/plain), 2.74 KB, created by
Fridolin Somers
on 2022-08-05 18:41:57 UTC
(
hide
)
Description:
Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-08-05 18:41:57 UTC
Size:
2.74 KB
patch
obsolete
>From aa90dfca09227bfb9c42fb7de715b65f6097aeff Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 5 Aug 2022 08:36:50 -1000 >Subject: [PATCH] Bug 31299: Fix duplicate output in > search_for_data_inconsistencies.pl > >In search_for_data_inconsistencies.pl when there are several inconsistencies on same framework, the second output of items contains the first one. > >Looks like it is since Bug 21466 > >Test plan using koha-testing-docker : >1) Create 2 inconsistencies on the same item via SQL : > update items set itemlost = 9 where itemnumber=900; > update items set notforloan = 8 where itemnumber=900; >2) Without patch >3) Run ./misc/maintenance/search_for_data_inconsistencies.pl >=> You see duplicate output : >== Wrong values linked to authorised values == > * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): > {900 => 8} > * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): > {900 => 8} {900 => 9} > >4) Apply patch >5) Run ./misc/maintenance/search_for_data_inconsistencies.pl >=> Fixed :D >== Wrong values linked to authorised values == > * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): > {900 => 9} > * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): > {900 => 8} >--- > misc/maintenance/search_for_data_inconsistencies.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index e1526e43a5..a2a3efdeef 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -237,11 +237,11 @@ use C4::Biblio qw( GetMarcFromKohaField ); > if (%$invalid_av_per_framework) { > new_section('Wrong values linked to authorised values'); > for my $frameworkcode ( keys %$invalid_av_per_framework ) { >- my $output; > while ( my ( $av_category, $v ) = each %{$invalid_av_per_framework->{$frameworkcode}} ) { > my $items = $v->{items}; > my $kohafield = $v->{kohafield}; > my ( $table, $column ) = split '\.', $kohafield; >+ my $output; > while ( my $i = $items->next ) { > my $value = $table eq 'items' ? $i->$column : $i->biblioitem->$column; > $output .= " {" . $i->itemnumber . " => " . $value . "}"; >-- >2.35.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 31299
:
138713
|
140700