Bugzilla – Attachment 135253 Details for
Bug 28152
Hidden error when importing an item with an existing itemnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28152: Fix import_items row creation if duplicate barcode
Bug-28152-Fix-importitems-row-creation-if-duplicat.patch (text/plain), 1.40 KB, created by
Joonas Kylmälä
on 2022-05-21 16:21:47 UTC
(
hide
)
Description:
Bug 28152: Fix import_items row creation if duplicate barcode
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-05-21 16:21:47 UTC
Size:
1.40 KB
patch
obsolete
>From 53f534e2978225f26c62b8ec472e148d3aa7a415 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 15 Apr 2021 12:12:23 +0200 >Subject: [PATCH] Bug 28152: Fix import_items row creation if duplicate barcode >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We are trying to insert "duplicate item barcode" into import_items.itemnumber (integer), >it fails with "Incorrect integer value: 'duplicate item barcode' for column 'itemnumber' at row 1" > >To reproduce: >Export a biblio with an item >Import it >=> The item is not added, and there is no new row in import_items. > >The error only appears in the log if you comment the close STDERR and >close STDOUT lines > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > C4/ImportBatch.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 845caa3b58..e17c1a07e2 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -791,7 +791,7 @@ sub BatchCommitItems { > $num_items_replaced++; > } elsif ($duplicate_barcode) { > $updsth->bind_param( 1, 'error' ); >- $updsth->bind_param( 2, 'duplicate item barcode' ); >+ $updsth->bind_param( 2, undef ); > $updsth->bind_param( 3, $row->{'import_items_id'} ); > $updsth->execute(); > $num_items_errored++; >-- >2.30.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 28152
:
119609
|
129243
|
135070
|
135253
|
135254
|
135267
|
135268
|
135294
|
135295