Bug 23460 - Be able to specify a default item type, to allow Koha to do things to items that don't have itypes?
Summary: Be able to specify a default item type, to allow Koha to do things to items t...
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-13 19:21 UTC by Liz Rea
Modified: 2024-12-23 08:06 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2019-08-13 19:21:47 UTC
We see a lot of 


item-level_itypes set but no itemtype set for item (225088) at /usr/share/koha/lib/Koha/Schema/Result/Item.pm line 740.

in the logs for various jobs that run. UI Koha doesn't much bother about these kinds of errors, they just junk up the logs but Koha keeps going. 

Cron Koha is super noisy though, with errors like this. It occurred to me that it might be nice to have a "default" item type, just so we can assume that everything's got an item type and stop seeing these infernal messages.

Maybe the one you set up in the onboarder should become the default, and allow people to pick the one they want to have as default from the UI later if they want? We'd only need it so that Koha knows what rules to apply to the item (among many other things that we depend upon itypes for).

What do you all think?
Comment 1 Katrin Fischer 2019-08-13 20:14:03 UTC
What we do is make the item type mandatory in the frameworks. That way you can't catalog an item without an item type, but you have to consciously pick. With a default that is applied automatically it would be really hard to find cataloguing mistakes. Also, Koha already uses the item type from the framework 942$c as a default 'suggestion' when you catalog a new item and you can add a default in the framework to enforce a default.

I am not sure we need an additional setting? 

Maybe it would be good to change the default frameworks to make item type a mandatory field?
Comment 2 Katrin Fischer 2019-08-13 20:26:22 UTC
Hm, I might have misunderstood (forcing an itemtype in the item vs having a fallback Koha just uses when itemtype empty). But a bit afraid it would require changing a lot of code to make that happen... favoring fixing the data a bit right now.
Comment 3 Katrin Fischer 2023-12-08 21:09:11 UTC
(In reply to Katrin Fischer from comment #2)
> Hm, I might have misunderstood (forcing an itemtype in the item vs having a
> fallback Koha just uses when itemtype empty). But a bit afraid it would
> require changing a lot of code to make that happen... favoring fixing the
> data a bit right now.

We have made the itemtype mandatory all over Koha since. There is also a bug that breaks the display in the OPAC for records with items missing itemtypes. I wonder if this is still needed?
Comment 4 Liz Rea 2023-12-26 22:13:01 UTC
This does seem better lately due to fixes in other areas. I think we can put this one to bed.

Liz