If I add an Item Search Field: Name: Subj Label: Subj Head MARC field: 650 MARC subfield: a Auth values: N/A I get an error when doing the item search: DBD::mysql::st execute failed: Unknown column 'bibliosubject.subject' in 'where clause' [for Statement " SELECT SQL_CALC_FOUND_ROWS items.* FROM items LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN biblio_metadata ON biblio_metadata.biblionumber = biblio.biblionumber WHERE 1 AND (bibliosubject.subject like ?) AND biblio_metadata.format = 'marcxml' AND biblio_metadata.marcflavour = ? ORDER BY title ASC LIMIT ?, ? " with ParamValues: 0="juvnile%", 1='MARC21', 2=0, 3=20] at /home/vagrant/kohaclone/C4/Items.pm line 2798.
We just fixed bug 17743 - could this be it?
No, it appears to be bad data in our sample install files: SELECT * FROM marc_subfield_structure WHERE tagfield=650 AND tagsubfield='a' AND frameworkcode=''\G; The kohafield is set to bibliosubject.subject, I am guessing this is cruft (In reply to Katrin Fischer from comment #1) > We just fixed bug 17743 - could this be it?
Can you detail the problem a bit more? Should we change this bug to be a clean-up bug for bibliosubject.subject in our default files?
Created attachment 58769 [details] [review] Bug 17831 - Item Search fails on custom subject search field This patch removes the assignment of non-existent koha field 'bibliosubject.subject' to MARC subject fields in the installer data for koha To test: You'll want a new fresh db 1 - Apply patch 2 - Run websintaller 3 - Ensure that thigns go smoothly 4 - Add/delete/edit some records and ensure that things are working with the installed frameworks
(In reply to Katrin Fischer from comment #3) > Can you detail the problem a bit more? Should we change this bug to be a > clean-up bug for bibliosubject.subject in our default files? Yes, I think that is what we need to do, I threw it together quikc but haven't tested - wondering if I need to do '' instead of null - need to test but thought the patch would better illustrate the issue.
Hi Nick, should this be NSO?
(In reply to Katrin Fischer from comment #6) > Hi Nick, should this be NSO? I think so, I just didn't test it myself, it should be a simple fix
Created attachment 95760 [details] [review] Bug 17831: Remove non-existig bibliosubject.subject mapping from frameworks This patch removes the assignment of non-existent koha field 'bibliosubject.subject' to MARC subject fields in the installer data for koha To test: You'll want a new fresh db 1 - Apply patch 2 - Run websintaller 3 - Ensure that thigns go smoothly 4 - Add/delete/edit some records and ensure that things are working with the installed frameworks Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 95761 [details] [review] Bug 17831: Database update - Tidy up frameworks in existing installations The mapped table and column doesn't exist, so we should also remove it from existing installations.
Created attachment 96011 [details] [review] Bug 17831: Remove non-existig bibliosubject.subject mapping from frameworks This patch removes the assignment of non-existent koha field 'bibliosubject.subject' to MARC subject fields in the installer data for koha To test: You'll want a new fresh db 1 - Apply patch 2 - Run websintaller 3 - Ensure that thigns go smoothly 4 - Add/delete/edit some records and ensure that things are working with the installed frameworks Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 96012 [details] [review] Bug 17831: Database update - Tidy up frameworks in existing installations The mapped table and column doesn't exist, so we should also remove it from existing installations. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.01
backported to 19.05.x for 19.05.06