[Koha-bugs] [Bug 17774] New: Acquisitions module getting internal server error when adding orders to basket - a case of barcode not autoincrementing (?)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 14 11:52:51 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17774

            Bug ID: 17774
           Summary: Acquisitions module getting internal server error when
                    adding orders to basket - a case of barcode not
                    autoincrementing (?)
 Change sponsored?: ---
           Product: Koha
           Version: 16.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Acquisitions
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: eugenegf at yahoo.com
        QA Contact: testopia at bugs.koha-community.org

In a new Koha 16.11 instance, when adding orders to basket with the following
system preferences: 
a) AcqCreateItem = placing an order
b) autoBarcode is set to generated in the form <branchcode>yymm0001.
c) plack enabled
d) 952$o has plugin 'barcode.pl'

A barcode is not filled up (just clicked 'Add item' button) during adding of
items since it is implicitly stated in the interface: "The autoBarcode system
preference is set to hbyymmincr and items with blank barcodes will have
barcodes generated upon save to database." However, when the order is being
saved, I am getting internal server error. So, I have to click the Back button
to go back to what I'm doing. And when I returned to the "add orders to basket"
interface, and then click save to finish the transaction, I am able to finish
the transaction, however, I now get two items ordered, first one with only the
title and the second one has the title and the patron who suggested the
material (see
http://koha.1045719.n5.nabble.com/file/n5913371/acqui_internal_server_error.png).

Tried this in another server with same database, however I'm getting "Software
error:

DBIx::Class::Storage::DBI::_dbh_execute(): Column 'itemnumber' cannot be null
at /usr/share/koha/lib/Koha/Acquisition/Order.pm line 68"

But when brought to the Basket no., I can see the order.

Delving into the plack-error message in the first server:
No existing hbyymmincr barcodes found.  Reverting to initial value. at
/usr/share/koha/lib/C4/Barcodes/hbyymmincr.pm line 62.
DBD::mysql::st execute failed: Duplicate entry 'DLSU-D16120002' for key
'itembarcodeidx' [for Statement "INSERT INTO items SET
            biblionumber        = ?,
            biblioitemnumber    = ?,
            barcode             = ?,
            dateaccessioned     = ?,
            booksellerid        = ?,
            homebranch          = ?,
            price               = ?,
            replacementprice    = ?,
            replacementpricedate = ?,
            datelastborrowed    = ?,
            datelastseen        = ?,
            stack               = ?,
            notforloan          = ?,
            damaged             = ?,
            itemlost            = ?,
            withdrawn           = ?,
            itemcallnumber      = ?,
            coded_location_qualifier = ?,
            restricted          = ?,
            itemnotes           = ?,
            itemnotes_nonpublic = ?,
            holdingbranch       = ?,
            paidfor             = ?,
            location            = ?,
            permanent_location  = ?,
            onloan              = ?,
            issues              = ?,
            renewals            = ?,
            reserves            = ?,
            cn_source           = ?,
            cn_sort             = ?,
            ccode               = ?,
            itype               = ?,
            materials           = ?,
            uri                 = ?,
            enumchron           = ?,
            more_subfields_xml  = ?,
            copynumber          = ?,
            stocknumber         = ?,
            new_status          = ?
          " with ParamValues: 0="4911", 1='4911', 2="DLSU-D16120002",
3='2016-12-14', 4=undef, 5="DLSU-D", 6=undef, 7=undef, 8='2016-12-14', 9=undef,
10='2016-12-14', 11=undef, 12=0, 13=0, 14=0, 15=0, 16=undef, 17=undef,
18=undef, 19=undef, 20=undef, 21="DLSU-D", 22=undef, 23=undef, 24=undef,
25=undef, 26=undef, 27=undef, 28=undef, 29="lcc", 30='', 31=undef, 32=undef,
33=undef, 34=undef, 35=undef, 36=undef, 37=undef, 38=undef, 39=undef] at
/usr/share/koha/lib/C4/Items.pm line 2119.
DBD::mysql::st execute failed: Column 'itemnumber' cannot be null [for
Statement "INSERT INTO `aqorders_items` ( `itemnumber`, `ordernumber`) VALUES (
?, ? )" with ParamValues: 0=undef, 1='45'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

And the second server's intranet error log snippet:
[Wed Dec 14 18:15:55.903548 2016] [cgi:error] [pid 19570] [client
112.198.75.180:54634] AH01215: [Wed Dec 14 18:15:55 2016] addorder.pl:         
 " with ParamValues: 0="4914", 1='4913', 2="DLSU-D16120002", 3='2016-12-14',
4=undef, 5="DLSU-D", 6=undef, 7=undef, 8='2016-12-14', 9=undef,
10='2016-12-14', 11=undef, 12=0, 13=0, 14=0, 15=0, 16=undef, 17=undef,
18=undef, 19=undef, 20=undef, 21="DLSU-D", 22=undef, 23=undef, 24=undef,
25=undef, 26=undef, 27=undef, 28=undef, 29="lcc", 30='', 31=undef, 32=undef,
33=undef, 34=undef, 35=undef, 36=undef, 37=undef, 38=undef, 39=undef] at
/usr/share/koha/lib/C4/Items.pm line 2119.

I feel that the barcode is not auto-incrementing (but I don't know why it
isn't) as I see in the first server the same barcode 'DLSU-D16120002' is
showing up several times, and this is supposed to be incremented. I also see
that this barcode is already used by another item. A discussion of this is in
http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-td5913371.html#a5914017

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list