Bugzilla – Attachment 37545 Details for
Bug 8684
Duplicate check for creating items on order broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8684: Fix duplicate check on creating items in the acquisition module
Bug-8684-Fix-duplicate-check-on-creating-items-in-.patch (text/plain), 1.77 KB, created by
Jonathan Druart
on 2015-04-07 12:23:49 UTC
(
hide
)
Description:
Bug 8684: Fix duplicate check on creating items in the acquisition module
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-07 12:23:49 UTC
Size:
1.77 KB
patch
obsolete
>From 4c3227f4855d434af76b192f450b960107335758 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 7 Apr 2015 14:14:18 +0200 >Subject: [PATCH] Bug 8684: Fix duplicate check on creating items in the > acquisition module > >The script acqui/check_uniqueness.pl has been introduced by bug 7178. >But bug 11425 added a call to a new subroutine SearchItemsByField in >order to refactore some code. This subroutine calls SearchItems with an >arrayref, which is not what SearchItems is expecting. >This broke the duplicate check done on creating items in the acquisition >module. > >To reproduce the issue: >1/ Fill the pref UniqueItemFields with "barcode" and AcqCreateItem with >"placing an order" >2/ Create a new basket >3/ Create a new order >4/ Close the basket >5/ Receive items and set barcode with one already in your DB >6/ Save >7/ Nothing happen on the interface, but an error should have been added >in your Koha log file: > Can't use an undefined value as an ARRAY reference at > /home/koha/src/acqui/check_uniqueness.pl line 48. > >Test plan: >1/ Repeat steps 1-6 >2/ You should see a warning on the interface > >Note that this should also happen with AcqCreateItem set to "creating an >order". >--- > C4/Items.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 845bc70..3aa3590 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2589,10 +2589,10 @@ For instance you can search all items with a specific stocknumber like this: > sub SearchItemsByField { > my ($field, $value) = @_; > >- my $filters = [ { >- field => $field, >- query => $value, >- } ]; >+ my $filters = { >+ field => $field, >+ query => $value, >+ }; > > my ($results) = SearchItems($filters); > return $results; >-- >2.1.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 8684
:
37545
|
37712
|
40790
|
40791
|
41171
|
41172