Bugzilla – Attachment 69030 Details for
Bug 19562
Inventory: How can we skip convolutes marked as problematic with no_barcode?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19562: Do not mark convolute items without barcode as problematic
Bug-19562-Do-not-mark-convolute-items-without-barc.patch (text/plain), 2.03 KB, created by
Marcel de Rooy
on 2017-11-08 15:19:45 UTC
(
hide
)
Description:
Bug 19562: Do not mark convolute items without barcode as problematic
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-11-08 15:19:45 UTC
Size:
2.03 KB
patch
obsolete
>From 2743db65b0d49282927874793bf45d3ee4b5b09e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 2 Nov 2017 10:15:12 +0100 >Subject: [PATCH] Bug 19562: Do not mark convolute items without barcode as > problematic >Content-Type: text/plain; charset=utf-8 > >Convolute items are bound together (belong to different biblio records) >and only one item has a barcode. All items are marked with a phrase like >Convolute (see regex below) in itemnotes. > >This patch skips the convolute items without barcode and does not mark >them as problematic during inventory when the item notes contain the phrase. >The regex used is: > $item->{itemnotes} =~ /convoluu?t/i; > >This regex will cover at least the following languages: >Danish, Dutch, English, Finnish, French, Italian, Norwegian, >Portuguese, Spanish, Swedish and probably other languages too. And can >be easily extended if needed. > >Note: Since the item hash does not contain itemnotes, we need to call >Koha::Items->find. We will only do so when the item does not have a >barcode. > >Test plan: >[1] Update an item so that it has no barcode, callnumber is X and item > notes contain Convolute. >[2] Upload a barcode file (contents may even be empty), filter on > callnumber X. Compare should not report the updated convolute. >[3] Remove the Convolute note. Repeat step 2. Inventory should report > the item now. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > tools/inventory.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 8df02ab..d080f29 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -292,6 +292,8 @@ if ( $compareinv2barcd ) { > for my $item ( @$inventorylist ) { > my $barcode = $item->{barcode}; > if( !$barcode ) { >+ $item->{itemnotes} = Koha::Items->find( $item->{itemnumber} )->itemnotes; >+ next if $item->{itemnotes} =~ /convoluu?t/i; > $item->{problems}->{no_barcode} = 1; > } elsif ( grep /^$barcode$/, @scanned_barcodes ) { > next; >-- >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 19562
: 69030