Bugzilla – Attachment 80757 Details for
Bug 21591
Data inconsistencies - Item types and biblio level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21591: Check for record level item type issues too
Bug-21591-Check-for-record-level-item-type-issues-.patch (text/plain), 2.11 KB, created by
Nick Clemens (kidclamp)
on 2018-10-17 19:58:49 UTC
(
hide
)
Description:
Bug 21591: Check for record level item type issues too
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-10-17 19:58:49 UTC
Size:
2.11 KB
patch
obsolete
>From bfa105a42b35c81a2582063476920b1e6b6c5a64 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 17 Oct 2018 19:56:12 +0000 >Subject: [PATCH] Bug 21591: Check for record level item type issues too > >To test: >1 - sudo koha-mysql kohadev >2 - UPDATE biblioitems SET itemtype = NULL where biblionumber = 1 >3 - UPDATE items SET itype = NULL where biblionumber = 1 >4 - perl misc/maintenance/search_for_data_inconsistencies.pl >5 - Notice warnings >6 - Apply patch >7 - Undefined itemtype on bibliolevel is now warned >--- > misc/maintenance/search_for_data_inconsistencies.pl | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index 525d8c7..a6d9abf 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -54,10 +54,17 @@ use Koha::Authorities; > if ( $items_without_itype->count ) { > new_section("Items do not have itype defined"); > while ( my $item = $items_without_itype->next ) { >- new_item( >- sprintf "Item with itemnumber=%s does not have a itype value, biblio's item type will be used (%s)", >- $item->itemnumber, $item->biblioitem->itemtype >- ); >+ if (defined $item->biblioitem->itemtype) { >+ new_item( >+ sprintf "Item with itemnumber=%s does not have a itype value, biblio's item type will be used (%s)", >+ $item->itemnumber, $item->biblioitem->itemtype >+ ); >+ } else { >+ new_item( >+ sprintf "Item with itemnumber=%s does not have a itype value, additionally no item type defined for biblionumber=%s", >+ $item->itemnumber, $item->biblioitem->biblionumber >+ ); >+ } > } > new_hint("The system preference item-level_itypes expects item types to be defined at item level"); > } >-- >2.1.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 21591
:
80757
|
88377
|
99920
|
99980
|
105180