[Bug 6931] New: hardcoded insert incompatible with UNIMARC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Bug #: 6931 Summary: hardcoded insert incompatible with UNIMARC Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: NEW Severity: blocker Priority: P5 Component: Database AssignedTo: gmcharlt@gmail.com ReportedBy: paul.poulain@biblibre.com QAContact: koha-bugs@lists.koha-community.org In updatedatabase, the $DBversion = "3.03.00.015"; contains : my $sth = $dbh->prepare("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)"); $sth->execute('648'); $sth->execute('654'); $sth->execute('655'); $sth->execute('656'); $sth->execute('657'); $sth->execute('658'); $sth->execute('662'); =>> it's marcflavour independant and will result in some pain in UNIMARC ! (648...662 should not exist in standard UNIMARC so, 1- dead data will be added and 2-if a library uses those fields for local use, that will break a lot of things (ie : the 6xx are used for authorities, the $9 for authid, so, I don't imagine what the result will be !) A simple if syspref("marcflavour") eq "marc21" before the insert should fix the bug -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|rel_3_6 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It seems this wasn't fixed :( Perhaps still worth fixing for libraries updating from older versions? 3976 $DBversion = "3.03.00.015"; 3977 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { 3978 my $sth = $dbh->prepare("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, 3979 `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) 3980 VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)"); 3981 $sth->execute('648'); 3982 $sth->execute('654'); 3983 $sth->execute('655'); 3984 $sth->execute('656'); 3985 $sth->execute('657'); 3986 $sth->execute('658'); 3987 $sth->execute('662'); 3988 $sth->finish; 3989 print "Upgrade to $DBversion done (Bug 5619: Add subfield 9 to marc21 648,654,655,656,657,658,662)\n"; 3990 SetVersion ($DBversion); 3991 } -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 9264 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9264&action=edit Bug 6931 : Only update frameworks for the correct marcflavour -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |chris@bigballofwax.co.nz Severity|blocker |major --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- This bug will still effect anyone coming from 3.2.x or previous, of which there are still hundreds of libraries. So i think the fix is worth doing. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- patch is OK -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |magnus@enger.priv.no, | |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: trivial patch. However, one question for magnus: are those fields relevant in NORMARC ? Shouldn't we use unless $marcflavour eq 'unimarc' ? I'll push the patch, because it fixes a very annoying bug for UNIMARC users. Note that, if you think there are no NORMARC libraries using 3.2 now, you shouldn't care for this patch ! -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 --- Comment #6 from Magnus Enger <magnus@enger.priv.no> --- Of these fields, NORMARC only uses 655, 656 and 658. In all of those subfield 9 is used for some kind of language information, and this is already defined for the frameworks in Koha. So updating subfield 9 the same way it's done for MARC21 here would not be a good idea. Of course, this will spell trouble for NORMARC libraries wanting to use authorities, but I think we'll tackle that when (and if) we get there. Hopefully NORMARC will be obsolete before that... ;-) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6931 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_6 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org