Bugzilla – Attachment 88377 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: Additionally check for blank strings in itypes
Bug-21591-Additionally-check-for-blank-strings-in-.patch (text/plain), 2.58 KB, created by
Nick Clemens (kidclamp)
on 2019-04-22 13:42:15 UTC
(
hide
)
Description:
Bug 21591: Additionally check for blank strings in itypes
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-04-22 13:42:15 UTC
Size:
2.58 KB
patch
obsolete
>From 26c31e374fb3b42f3cca379aaad4e53802e498d0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 22 Apr 2019 13:36:21 +0000 >Subject: [PATCH] Bug 21591: Additionally check for blank strings in itypes > >--- > C4/Reserves.pm | 2 +- > misc/maintenance/search_for_data_inconsistencies.pl | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 41ac2c4dc5..56ce22f307 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -330,7 +330,7 @@ sub CanItemBeReserved { > > # Check for item on shelves and OnShelfHoldsAllowed > return { status => 'onShelfHoldsNotAllowed' } >- unless ( IsAvailableForItemLevelRequest($item,$borrower) ); >+ unless ( IsAvailableForItemLevelRequest($item->unblessed,$borrower) ); > > # Check for the age restriction > my ( $ageRestriction, $daysToAgeRestriction ) = >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index 37b697b977..c19173d1c6 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -51,11 +51,11 @@ use Koha::Authorities; > > { > if ( C4::Context->preference('item-level_itypes') ) { >- my $items_without_itype = Koha::Items->search( { itype => undef } ); >+ my $items_without_itype = Koha::Items->search( { -or => [itype => undef,itype => ''] } ); > if ( $items_without_itype->count ) { > new_section("Items do not have itype defined"); > while ( my $item = $items_without_itype->next ) { >- if (defined $item->biblioitem->itemtype) { >+ if (defined $item->biblioitem->itemtype && $item->biblioitem->itemtype ne '' ) { > 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 >@@ -86,7 +86,7 @@ use Koha::Authorities; > > my @itemtypes = Koha::ItemTypes->search->get_column('itemtype'); > if ( C4::Context->preference('item-level_itypes') ) { >- my $items_with_invalid_itype = Koha::Items->search( { itype => { not_in => \@itemtypes } } ); >+ my $items_with_invalid_itype = Koha::Items->search( { -and => [itype => { not_in => \@itemtypes }, itype => { '!=' => '' }] } ); > if ( $items_with_invalid_itype->count ) { > new_section("Items have invalid itype defined"); > while ( my $item = $items_with_invalid_itype->next ) { >-- >2.11.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 21591
:
80757
|
88377
|
99920
|
99980
|
105180