Bug 28846 - MarcRecordFromNewSuggestion needs mapping to biblioitems.itemtype
Summary: MarcRecordFromNewSuggestion needs mapping to biblioitems.itemtype
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 01:18 UTC by Fridolin Somers
Modified: 2022-07-16 11:58 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-08-12 01:18:57 UTC
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.
Comment 1 Katrin Fischer 2022-07-16 11:58:55 UTC
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?