In C4::Suggestions, MarcRecordFromNewSuggestion uses mapping to biblioitems.itemtype : https://git.koha-community.org/Koha-community/Koha/src/commit/e9428f662fe2ec0271878ec78886e7f95a25a9e1/C4/Suggestions.pm#L614 But this Koha to MARC mapping may not exists when itemtype is on item level. Same for biblio.autor, even if unlikely.
Libraries using item-level itypes usually still have the mapping on record level, although they might set it to be not mandatory in cataloguing. There is a lot of functionality tied to the record level itype, even when using item level itypes, so both make sense to have. biblio.author should also exist. Is this to avoid an explosion if the mapping doesn't exist? I tried to remove both and create a record from a suggestion: * Administration > Kohat-to-MARC-Mapping, unmap biblio.author and biblioitems.itemtype (not a good idea, but for testing) * Add a new suggestion > BOOM! Tag "" is not a valid tag. at /kohadevbox/koha/C4/Suggestions.pm line 492. This is actually odd, because creating a suggestions doens't create a MARC record yet. Is this a non-fix if mappings are also required in other places or an even bigger issue?
We have a big customer that has no mapping there for a long time and only experienced a problem recently while trying to use the suggestion module. I'll propose a patch to fix issue there ; I don't think other parts of Koha are broken without this mapping, and if it is the case, they should probably be fixed each time.
Created attachment 188472 [details] [review] Bug 28846: Check if biblioitems.itemtype mapping exists before using itemtypes in suggestions Test plan: 1 - Ensure you have no mappings on biblioitems.itemtype 2 - Create a suggestion -> there is a field "Document type" you get an error when submitting. 3 - Apply patch 4 - Create a suggestion -> there is no field anymore and you get no error 5 - Put back the mapping on biblioitems.itemtype and check the field "Document type" is still present suggestion form