Bug 35901

Summary: Tell library on About page when item-level_itypes is set but there are items with no itemtype in the database
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: AboutAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: laura, magnus, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36039
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Aleisha Amohia 2024-01-24 22:08:36 UTC
If item-level_itypes is set to 'specific item', using or accessing an item with no itype causes Koha to throw a 500 error.

There will be a more helpful warning in the logs, i.e. "[2024/01/25 08:59:52] [WARN] item-level_itypes set but no itemtype set for item (41984) at /usr/share/koha/lib/Koha/Schema/Result/Item.pm line 999."

But this isn't very helpful for the library.

It would be great to have a check that gets the value of the item-level_itypes system preference, if set to 'specific item', gets a list of any items with no itype, and displays this in the System Information tab in the About module, as a warning. Then the library can run a batch modification and give the items itypes, or change the system preference.