[Bug 7263] New: Determine maximum length of some fields or subfields when cataloguing
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Bug #: 7263 Summary: Determine maximum length of some fields or subfields when cataloguing Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging AssignedTo: gmcharlt@gmail.com ReportedBy: juan.sieira@xercode.es QAContact: ian.walls@bywatersolutions.com Determine maximum length of some fields or subfields when cataloguing a biblio or an item. Some libraries need to specify the maximum number of characters you can have a field or subfield, whether cataloguing a biblio or an item. For default it will be 9999 max length. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |juan.sieira@xercode.es --- Comment #1 from Juan Romay Sieira <juan.sieira@xercode.es> 2011-11-24 18:00:57 UTC --- Created attachment 6395 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6395 Path to this enhancement Apply the patch and in Administration › MARC Frameworks , edit the MARC Structure of a framework, edit the subfields of a field and under "more contraints" there is a new input "Max length" to determine the max characters of this subfield. Create or modify a biblio/item to see it. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Duncan <duncan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |duncan@catalyst.net.nz --- Comment #2 from Duncan <duncan@catalyst.net.nz> 2011-12-18 22:45:07 UTC --- After fixing a merge error in the updatedatabase.pl file the patch applied fine. The max length field can successfully be found where it is supposed to be. However, applying the patch also prevented me from being able to add new MARC records. On going to the add screen none of the input fields are present and it just remains blank. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Patch Status|Needs Signoff |Failed QA --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-19 05:20:02 UTC --- Hi Duncan, from your description I think this is 'failed qa'. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6395|0 |1 is obsolete| | --- Comment #4 from Juan Romay Sieira <juan.sieira@xercode.es> 2011-12-19 09:42:28 UTC --- Created attachment 6864 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6864 Patch to apply in current master This patch applies to current master -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #5 from Juan Romay Sieira <juan.sieira@xercode.es> 2011-12-19 09:47:14 UTC --- I applied the patch again and haven't found any error. I setup a max length to one of the subfields of the 245 and has done what it supposed to do. I uploaded another patch compatible with the current master. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6864|0 |1 is obsolete| | --- Comment #6 from Juan Romay Sieira <juan.sieira@xercode.es> 2012-02-09 17:39:25 UTC --- Created attachment 7537 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7537 Patch to current master -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jcamins@cpbibliography.com --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- The update included with this patch is MARC21-specific, but will operate on UNIMARC databases as well. Please correct the update to handle the three supported MARC flavours appropriately. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7537|0 |1 is obsolete| | --- Comment #8 from Juan Romay Sieira <juan.sieira@xercode.es> --- Created attachment 8361 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8361&action=edit Patch to apply in current master The patch was modified to handle the supported MARC flavours (in syspref) in updatedatabase -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Juan Romay Sieira <juan.sieira@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 laurenthdl <henridamien.laurent@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |henridamien.laurent@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 laurenthdl <henridamien.laurent@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8361|0 |1 is obsolete| | --- Comment #9 from laurenthdl <henridamien.laurent@biblibre.com> --- Created attachment 8454 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8454&action=edit patch signed off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8454|0 |1 is obsolete| | Status|Signed Off |Passed QA Assignee|juan.sieira@xercode.es |jonathan.druart@biblibre.co | |m --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 8561 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8561&action=edit patch signed off Previous signedoff patch does not apply (fatal: sha1 information is lacking or useless (C4/Biblio.pm). Repository lacks necessary blobs to fall back on 3-way merge.) This one is good. Marked as Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #11 from Magnus Enger <magnus@enger.priv.no> --- As far as I can see, this adds the maxlength column to installations that are upgraded, but what about fresh installs? Shouldn't maxlength be added to all existing frameworks, or am I missing something? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hi Magnus, The patch adds a default value for this new column: `maxlength` int(4) NOT NULL DEFAULT '9999' You shouldn't have a problem for a fresh install with a default value. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #13 from Magnus Enger <magnus@enger.priv.no> --- But updatedatabase changes the default for a couple of fields: +$DBversion = "3.07.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(" + ALTER TABLE `marc_subfield_structure` ADD `maxlength` INT( 4 ) NOT NULL DEFAULT '9999'; + "); + $dbh->do(" + UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; + "); + $dbh->do(" + UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='MARC21','40','9999') WHERE tagfield='008'; + "); + $dbh->do(" + UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='UNIMARC','36','9999') WHERE tagfield='100'; + "); + print "Upgrade to $DBversion done (Add new field maxlength to marc_subfield_structure)\n"; + SetVersion($DBversion); +} + So all marcflavours on upgraded installations will have maxlength = 24 for 000, while fresh installs will have 9999. And upgraded MARC21 installations will have maxlength = 40 for field 008 while fresh installations will have maxlength = 9999. Might not be much of a problem, but it will lead to subtle differences in installations depending on their history and perhaps a potential for future confusion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #14 from Juan Romay Sieira <juan.sieira@xercode.es> --- You're not missing nothing, I missed to include in fresh installs this change. I'll push in a few minutes those files to update fields like 000, 008, 100 (unimarc)... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #15 from Magnus Enger <magnus@enger.priv.no> --- (In reply to comment #14)
You're not missing nothing, I missed to include in fresh installs this change. I'll push in a few minutes those files to update fields like 000, 008, 100 (unimarc)...
Yay! I'm working on a patch to change some things in the NORMARC frameworks anyway (bug 7850), so I'll include the maxlength column for all subfields there, with 000 = 24 and 008 = 40. That should take care of fresh NORMARC installs. To be complete, updatedatabase.pl should do this part for NORMARC too: UPDATE marc_subfield_structure SET maxlength = IF ((SELECT value FROM systempreferences WHERE variable = 'marcflavour')='NORMARC','40','9999') WHERE tagfield='008'; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |ASSIGNED Severity|enhancement |critical --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, bit confused here - from the comments I think we still need a patch to fix the fields on upgraded installations? I am changing bug status - please reset if I missed something! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8561|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #17 from Magnus Enger <magnus@enger.priv.no> --- There is a separate bug for the followup: Bug 7855. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #18 from Juan Romay Sieira <juan.sieira@xercode.es> --- No this is not obsolete. Magnus and me uploaded two patches that complemented this one, bug 7855 and bug 7850. On this patch, 7263, in a fresh install the length of the fields 000, 008, 100 ... is 9999, not the correct length. With patches 7855 and 7850 we fixed this sutuation. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7855, 7850 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ah, I thought the patch had been pushed already - do you want to reset the patch here? I am adding the other bugs as dependending on this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8561|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #20 from Juan Romay Sieira <juan.sieira@xercode.es> --- yeah, kf, that's ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@biblibre.co |juan.sieira@xercode.es |m | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #21 from Magnus Enger <magnus@enger.priv.no> --- As far as I can see this was originally signed off - setting it back to that. And I sure hope this and bug 7855 make it into 3.8, because bug 7850 relies on these and it is already pushed to master... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 --- Comment #22 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #21)
As far as I can see this was originally signed off - setting it back to that.
And I sure hope this and bug 7855 make it into 3.8, because bug 7850 relies on these and it is already pushed to master...
Magnus, I don't understand why this has been switched to signed-off : the patch attached has been pushed (020c095 Bug 7263 - Determine maximum length of some fields or subfields when cataloguing a biblio or an item) The follow-up 7855 is still to be signed-off and pushed though -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #23 from Magnus Enger <magnus@enger.priv.no> --- Yes sorry - I got confused! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #24 from Magnus Enger <magnus@enger.priv.no> --- Setting it back to "Pushed to master" now! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7263 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |8018 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org