missing column is referered to in 23 framework files koha.git:$ grep -irl 'coded_location_qualifier' ./* |wc -l 23 http://git.koha-community.org/cgi-bin/gitweb.cgi?p=koha.git;a=blob;f=installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql;h=383a9d92735530224271ec739ac30ad60e96504e;hb=HEAD#l121 and causes additem.pl to fail sometimes [Mon May 30 15:11:49 2011] additem.pl: DBD::mysql::st execute failed: Unknown column 'coded_location_qualifier' in 'field list' at /home/koha/koha.git/C4/Items.pm line 2088. [Mon May 30 15:11:49 2011] additem.pl: ERROR in _koha_modify_item UPDATE items SET restricted=?,items.cn_sort=?,wthdrawn=?,coded_location_qualifier=?,notforloan=?,replacementpricedate=?,itemnumber=?,itemnotes=?,ccode=?,location=?,itemcallnumber=?,stack=?,itemlost=?,barcode=?,uri=?,items.cn_source=?,materials=?,datelastseen=?,price=?,issues=?,homebranch=?,replacementprice=?,more_subfields_xml=?,holdingbranch=?,booksellerid=?,damaged=?,stocknumber=?,datelastborrowed=?,dateaccessioned=?,enumchron=?,copynumber=?,permanent_location=?,itype=?,paidfor=? WHERE itemnumber=?Unknown column 'coded_location_qualifier' in 'field list' at /home/koha/koha.git/C4/Items.pm line 2091.
i'm not sure what the fix is here... the missing column is not refered to *explicilty* in any code either. so, we either remove the rows from the framework 'marc_subfield_structure' table or, add the missing column to the items table
hmm, an old email thread on the missing 'items.items.coded_location_qualifier' column hints that its something to ignore http://koha.1045719.n5.nabble.com/What-is-the-coded-location-qualifier-in-952-f-td3061124.html ------------------------------------------------- Re: What is the coded location qualifier in 952 $f Practical answer: a field to ignore entirely ;) Long answer: It's probably derived from the MARC21 definition of the 852 $f, also called "coded location qualifier", which is meant to encode a situation where most of the items in a run of a serial are held in a location (e.g., the magazine stacks) with a few held in a second location (the new magazines area). For the gory details, please see: http://www.loc.gov/marc/holdings/hd852.html Koha doesn't do anything with that subfield, and certainly makes no attempt to parse the coding. Regards, Galen -------------------------------------------------
(In reply to comment #2) > i'm not sure what the fix is here... > > the missing column is not refered to *explicilty* in any code either. > > so, we either remove the rows from the framework 'marc_subfield_structure' > table > or, add the missing column to the items table i have a better idea for this fix ;) lets leave the 952$f defined in the frameworks (as it is in the LOC specs) but remove the buggy reference to the 'items.coded_location_qualifier' column patch attached....
Created attachment 4310 [details] [review] patch
Created attachment 4474 [details] [review] [SIGNED-OFF] bug 6428: remove mapping to non-existent field in frameworks To test: - add a new title and an item with coded location qualifier and barcode - save item - ! 952$f will not be saved, but item and barcode will be created - edit item, fill 952$f and change barcode, save - ! changes will not be saved Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This patch will only work for new installations. Do we need a follow-up with a database update for existing installations?
(In reply to comment #7) > This patch will only work for new installations. > Do we need a follow-up with a database update for existing installations? indeed, i'll add a patch to fix existing systems too...
Created attachment 4678 [details] [review] patch for existing Kohas applied to 6e2e58107f2347ec87281414fb0e5e12bf7806bf
Created attachment 4835 [details] [review] Signed follow up patch (db rev)
Mason, could you sent an updated patch please, this one doesn't apply anymore.
Created attachment 5793 [details] pix
(In reply to comment #11) > Mason, could you sent an updated patch please, this one doesn't apply anymore. yes, no problem my new patch combines both of my old patches (4835, 4474), and is applied to commit cfe8b6bd9a4f1921cb728d784083300344bcf2b1
Created attachment 5795 [details] [review] patch ps, ignore that pix attachment, its for a different bug ;)
Mason, you've updated the status to "pushed for QA". Shouldn't it be "needs signoff" -or "signed-off"(needs QA) ?
(In reply to comment #15) > Mason, you've updated the status to "pushed for QA". Shouldn't it be "needs > signoff" -or "signed-off"(needs QA) ? oops! good spotting Paul :) yep, i've corrected the status to 'signed-off'
QA comments: There are a few references to the coded_location_qualifier field: installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), installer/data/Pg/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_fastadd_framework.sql: ('952','f','Coded location qualifier','Coded location qualifier',0,0,'items.coded_location_qualifier',10,'','','',NULL,0,'FA','',NULL,NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'BKS', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'CF', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SR', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'VR', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'AR', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'KT', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'IR', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, 'SER', '', '', NULL), installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql: ('952', 'f', 'Coded location qualifier', 'Coded location qualifier', 0, 0, 'items.coded_location_qualifier', 10, '', '', '', NULL, 0, '', '', '', NULL), Could you remove them as well ? The updatedatabase SQL says : installer/data/mysql/updatedatabase.pl: $dbh->do("UPDATE marc_subfield_structure SET kohafield = NULL WHERE tagfield = 952 AND tagsubfield = 'f' AND kohafield = 'items.coded_location_qualifier'"); That won't fix the bug with someone having moved this reference in another field. I think this can happend only in theory and wouldn't have marked failed QA just for this, but as you'll have to add some forgotten references, you can also update the SQL (or object/argue if you think i'm wrong)
This bug is yet active, the solution would so easy as add the column 'items.coded_location_qualifier'. Where is the problem? I don´t understand
(In reply to comment #18) > This bug is yet active, the solution would so easy as add the column > 'items.coded_location_qualifier'. > Where is the problem? I don´t understand Nuno, The problem is that I made some comments about mistakes in the patch, and No-one (hey, mason, are you here ?) took care of my comments.
Created attachment 13005 [details] [review] proposed patch
Created attachment 13008 [details] [review] fixed patch
Created attachment 13222 [details] [review] [SIGNED-OFF] Bug 6428 - refered column 'items.coded_location_qualifier' does not exist Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to comment #22) > Created attachment 13222 [details] [review] > [SIGNED-OFF] Bug 6428 - refered column 'items.coded_location_qualifier' does > not exist > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> tested OK, passing QA... thanks for the patch Nuño! :) $ koha-qa.pl -c 1 testing 1 commit(s) (applied to 9ace63b 'Bug 9001: Remove Zebraqueue_daemon ') 7bcc447 Bug 6428 - refered column 'items.coded_location_qualifier' does not exist - C4/Items.pm - installer/data/mysql/kohastructure.sql - installer/data/mysql/updatedatabase.pl * C4/Items.pm OK * installer/data/mysql/updatedatabase.pl OK
This patch has been pushed to master.
I think there is a bigger problem with this patch - only the table items is altered, but deleteditems is not. Removing 'pushed to master' - I think we need another patch here.
I agree this needs to be reverted or fixed before the release, with mismatched tables deleted items are not copied. This results in data loss, updating to blocker.
Created attachment 13387 [details] [review] affix to patch Added coded_´location_qualifier´ column to `deleteitems`.
Created attachment 13388 [details] [review] affix to patch 644 instead of 755
Thank you for your follow-up! Can you please also it do updatedatabase as well? As it's already pushed I am not sure if we can just change the original one or better do a new database update statement, maybe we can get some other opinion on this?
Created attachment 13391 [details] [review] affix to patch updatedatabase added
It must be a new database revision.
The follow-up need signoff (I haven't tested it myself yet) waiting for the follow-up to be pushed to master before pushing the main patch to 3.10.x branch
Created attachment 13401 [details] [review] [SIGNED-OFF] Bug 6428 [Follow-up] refered column 'items.coded_location_qualifier' does not exist - affix Signed-off-by: Owen Leonard <oleonard@myacpl.org>
QA Comments: Same as previous patch. Normally the new column has to be positionned in the table after another field in order to have the same structure as in kohastructure.pl The first patch has been pushed like this so I supposed this one could be pushed like this too. Marked as Passed QA.
Created attachment 13419 [details] [review] Bug 6428 [Follow-up] refered column 'items.coded_location_qualifier' does not exist You're right, I uploaded the new patch with this change, thanks.
Created attachment 13420 [details] [review] Bug 6428 [Follow-up] refered column 'items.coded_location_qualifier' does not exist Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Patch pushed to branch 3.10.x
Released in 3.10.0
I just stumble over this report anno 2023. I noticed in my data (empty) occurrences of $f in more_subfields_xml. And surprisingly, there is no mapping in my data from $f to items.coded_location_qualifier. So this leaves a theoretical issue: AFAICS the patches here did not check if there was a Koha to MARC mapping when adding the item field but assumed that it was there? Hence possible data in the xml field was lost when no mapping existed. But yes, if you do not use the field, no problem :)