[Bug 28846] New: MarcRecordFromNewSuggestion needs mapping to biblioitems.itemtype
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Bug ID: 28846 Summary: MarcRecordFromNewSuggestion needs mapping to biblioitems.itemtype Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In C4::Suggestions, MarcRecordFromNewSuggestion uses mapping to biblioitems.itemtype : https://git.koha-community.org/Koha-community/Koha/src/commit/e9428f662fe2ec... But this Koha to MARC mapping may not exists when itemtype is on item level. Same for biblio.autor, even if unlikely. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 188472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188472&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188472|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 190709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190709&action=edit 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 Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes creating release notes| |suggestions in the staff | |interface when there is no | |Koha to MARC mapping for | |`biblioitems.itemtype` | |(Koha administration > | |Catalog > Koha to MARC | |mapping). | | | |If there was no mapping, | |and you created a new | |suggestion (Acquisitions > | |Acquisitions home > | |Suggestions > New | |suggestion) you would get | |an error ("Tag "" is not a | |valid tag...."), regardless | |of whether you selected a | |value for the `Document | |type` field or not. | | | |Now: | |- If there is no mapping, | |the `Document type` field | |is no longer shown on the | |suggestion form. | |- If there is a mapping, | |the `Document type` field | |is shown on the suggestion | |form and works as expected. --- Comment #5 from David Nind <david@davidnind.com> --- I only tested in a MARC21 installation. Is testing in a UNIMARC installation required as well? Testing notes (using KTD): 1. Step 1: 1.1 Go to Administration > Catalog > Koha to MARC mapping 1.2 Find the biblioitems.itemtype mapping 1.3 Click "Remove" 1.4 Run these scripts: . misc/batchRebuildBiblioTables.pl -c . misc/batchRebuildItemsTables.pl -c 2. Step 2: Create a suggestion: 2.1 Acquisitions > Acquisitions home > Suggestions > New suggestion 2.2 Enter details for a suggestion 2.3 Choose a value for "Document type" field 2.4 You get an error trace: Tag "" is not a valid tag. at /kohadevbox/koha/C4/Suggestions.pm line 448. at /usr/lib/x86_64-linux-gnu/perl-base/Carp.pm line 289 2.5 Repeat adding a new suggestion, without selecting anything for the "Document type" field 2.6 You get the same error as in 2.4 3. Step 5: 3.1 Reset everything in KTD so that the mapping is back: reset_all 3.2 Test again with creating a suggestion, one with something in "Document type" and one with nothing selected 3.3 Suggestions successfully created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Nind from comment #5)
I only tested in a MARC21 installation. Is testing in a UNIMARC installation required as well?
I think no, it is not required. Thanks a lot for testing, a real gift under the tree :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190709|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 199195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199195&action=edit 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 Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28846 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org