Bugzilla – Attachment 168918 Details for
Bug 37316
Cannot add items to basket via file if barcodes not supplied
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37316: Treat empty string barcodes as undef
Bug-37316-Treat-empty-string-barcodes-as-undef.patch (text/plain), 1.65 KB, created by
Martin Renvoize (ashimema)
on 2024-07-12 14:24:59 UTC
(
hide
)
Description:
Bug 37316: Treat empty string barcodes as undef
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-07-12 14:24:59 UTC
Size:
1.65 KB
patch
obsolete
>From 6da8aeb04529127d5dd68622c675fbd0b4472d07 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 11 Jul 2024 17:17:29 +0000 >Subject: [PATCH] Bug 37316: Treat empty string barcodes as undef > >To test: >1.Add the following to MarcItemFieldsToOrder: > >homebranch: 949$a >holdingbranch: 949$b >itype: 949$y >nonpublic_note: 949$x >public_note: 949$z >loc: 949$c >ccode: 949$8 >notforloan: 949$7 >uri: 949$u >copyno: 949$t >price: 949$g|949$j >replacementprice: 949$v >itemcallnumber: 949$o >quantity: 949$k >budget_code: 949$l >coded_location_qualifier: 949$f >enumchron: 949$h > >2. Add the following to MarcFieldsToOrder: > >price: 949$g >quantity: 949$k >budget_code: 949$l >discount: 949$m >sort1: 949$n >sort2: 949$q > >3. Acquisitions > Find a vendor >4. Create a new basket -> Add to basket -> From new file >5. Use the file uplodaded in this bug report. >6. Set format to MARCXML and stage for import. >7. Add staged files to basket >8. Select all, make sure you add an item type, and choose 'Do not look for matching records' >9. Save and kaboom. >10. APPLY PATCH and restart_all >11. Follow the steps again, this time no kaboom. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Item.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 91c15b22d55..247fae7cde5 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -98,6 +98,9 @@ sub store { > $self->itype($self->biblio->biblioitem->itemtype); > } > >+ # Ensure barcode is either defined or undef >+ $self->barcode(undef) if $self->barcode eq ''; >+ > $self->barcode( C4::Circulation::barcodedecode( $self->barcode ) ); > > my $today = dt_from_string; >-- >2.45.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 37316
:
168767
|
168853
|
168854
|
168855
|
168858
|
168917
| 168918 |
168919