Hi Barton,

I think holds on items without item types is a special case of "items without itemtypes". Generally items without itemtypes (with item-level_itype on items) will cause problems with Koha and should be avoided. I think the best option would be to make itemtype mandatory now that bug 14662 is fixed.

Jonathan has started a new script to catch inconsistencies like that, that can check for missing itemtypes:

Bug 21150 -  Data inconsistencies - item types
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21150

It can also check for false authority types, and missing holdingbranch and homebranch in items. More could be added to it.

Hope this helps,

Katrin

On 28.09.2018 21:20, Barton Chittenden wrote:

When ByWater started upgrading our partners to 17.11 last spring, I noticed that we were getting a lot of errors of the form

"can't call method * on an undefined value at ..."

We're starting to see these errors because more and more of our code uses Koha objects, and these will fail if a method is called on an undefined object.


I think that there was also another thread about this, which I can't find at the moment... Jonathan's opinion on this is that we should start creating queries which find data that will fail. This thread is for those queries, since I have an example:

Circulating or holdable items without item type

SELECT
    biblionumber,
    itemnumber,
    barcode,
    title,
    notforloan
FROM
    items
    INNER JOIN biblio USING (biblionumber)
WHERE
    notforloan < 1
    AND itype IS NULL

Once we have a few of these at hand, I'll start a page on the Koha wiki.



_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/