Bug 37609

Summary: Item type code of 0 causes cascade of failure
Product: Koha Reporter: Esther Melander <esther.melander>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Esther Melander 2024-08-09 15:58:37 UTC
The general rule of thumb when creating item type codes is all capital letters, no spaces, no special characters. This implies that alpha numeric characters will work, including the number 0. However if an item type is created with a code of 0, it will cause various failures. I am assuming Koha is reading the number 0 as null or blank. If the number 0 cannot be used, documentation should include both best practices but also what should not be used like the number 0.

These are the failures I made note of:

1. An item can't be saved with the 0 item type in the 952$y or the 942$c, which also prevents circulation.
2. If a circulation rule is created with the 0 item type, the rule can't be deleted.

Deleting the 0 item type is the only way to remove the circulation rule.

I did some additional testing where I changed the Item Type code to '0A' and 'A0' and had similar results.