[Bug 5608] New: Tool to move MARC21 series info to 490 tag
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Summary: Tool to move MARC21 series info to 490 tag Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Command-line Utilities AssignedTo: gmcharlt@gmail.com ReportedBy: mdhafen@tech.washk12.org QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 With the MARC21 standard moving from the 440 to the 490 it would be nice to have to tool that would move information in the catalogue from the 440 to the 490. I've written a tool that switches the information in the two tags for records found to have series information in the database. -- 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=5608 --- Comment #1 from Michael Hafen <mdhafen@tech.washk12.org> 2011-01-11 23:31:23 UTC --- Created attachment 2978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2978 proposed patch to add command-line tool to migration_tools -- 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=5608 --- Comment #2 from Michael Hafen <mdhafen@tech.washk12.org> 2011-01-31 21:59:48 UTC --- Seems this tool isn't perfect. Instead up updating fields it duplicates them. Quite messy. I've looked at it and can't tell what the problem is. Someone smarter than me will have to fix it if it gets used. -- 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=5608 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |jcamins@cpbibliography.com -- 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. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-02-12 23:16:43 UTC --- Marking "Failed QA" per Michael Hafen's last comment. -- 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. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7947 -- 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=5608 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED Assignee|gmcharlt@gmail.com |mdhafen@tech.washk12.org --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Changing assignment and setting to ASSIGNED. -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2978|0 |1 is obsolete| | --- Comment #5 from Michael Hafen <mdhafen@tech.washk12.org> --- Created attachment 14437 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14437&action=edit New script which works properly I've updated the script to use different methods in the MARC::XXX perl modules. This time it works right, and doesn't just copy fields. It even watches for duplicated tags and subfields. -- 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=5608 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff CC| |chris@bigballofwax.co.nz --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Don't forget to set it to Needs Signoff Michael, or no one will notice it is ready to be tested :) -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2978|1 |0 is obsolete| | -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Michael, your second patch modify the first. So it's not supposed to be obsolete. -- 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=5608 --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Michael, I tried your script. Apparently it works, at last it moved data from 440 to 490. But there is no indication of progress, nor command line options (at last -h or --help). I think you are missing some of the indications in http://wiki.koha-community.org/wiki/Coding_Guidelines#Perl Also, koha-qa complains about indentations. -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2978|0 |1 is obsolete| | Attachment #14437|0 |1 is obsolete| | --- Comment #9 from Michael Hafen <mdhafen@tech.washk12.org> --- Created attachment 15579 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15579&action=edit New patch which would pass QA tool I even ran the koha_qa tool myself to see if it would pass :) -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- 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=5608 --- Comment #10 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Two things: a) Add "v" (verbose) option to usage b) when running without arguments, it seems to run anyway. Look at the last two lines. Is that ok? bgkriegel@oak:~/kohaclone$ misc/migration_tools/switch_marc21_series_info.pl misc/migration_tools/switch_marc21_series_info.pl: switch MARC21 440 tag and 490 tag contents Parameters: -c Commit the changes to the marc records -m Also update the Koha field to MARC framework mappings for the seriestitle and volume Koha fields. --help or -h show this message. Examining MARC records... There appears to be no series information to change -- 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=5608 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #11 from David Cook <dcook@prosentient.com.au> --- I like the idea behind this patch, Michael, but I don't think it is as comprehensive as it should be. Take a look at the "Field Definition and Scope" and "Conversion to Current Fields" sections of the MARC 440 page provided by the Library of Congress (http://www.loc.gov/marc/bibliographic/bd440.html). This page states that one should "concatenate field 440 subfields $a, $n and $p and place the new string into 490 subfield $a; and copy the content of 440 subfields $v, $x, $6, and $8 into the same subfields in field 490. Any additional subfields in field 440 do not convert to 490 but do convert to field 830." The additional subfields from 440 are the authority-related $w and $x, which would go into field 830, because it is the field used to link the bib record with the "uniform title" authority record for that series. -- Of course, not all libraries use authorities, so I think it would be useful to have a parameter that handles migrating the 440 to the 490, or migrating the 440 to the 490 AND the 830. If the 440 goes to the 490, the first indicator for the 490 should be 0. If the 440 goes to the 490 and the 830, the first indicator for the 490 should be 1. -- 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=5608 --- Comment #12 from Michael Hafen <mdhafen@tech.washk12.org> --- (In reply to comment #10)
Two things:
a) Add "v" (verbose) option to usage
b) when running without arguments, it seems to run anyway. Look at the last two lines. Is that ok?
I've added the 'v' option to usage. When run without arguments it is supposed to look that way. My thinking was that by showing the usage the user would know something wasn't right, and it would show the number of records that would be changed. It might be confusing to some users though, so I'll add a line instructing them to run it with the 'c' option to make the changes. -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15579|0 |1 is obsolete| | --- Comment #13 from Michael Hafen <mdhafen@tech.washk12.org> --- Created attachment 15604 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15604&action=edit new patch to pass QA and with authorities linking option My thanks to David Cook for pointing out the information from LOC.gov about concatenating fields and creating 830 tags for authority information. This patch takes all that into account. -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15579|1 |0 is obsolete| | -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15579|0 |1 is obsolete| | --- Comment #14 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 15660 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15660&action=edit [SIGNED-OFF] Bug 5608 - command-line tool to switch information in 440 and 490 tags With the MARC21 standard moving from the 440 tag to the 490, this tool is to help libraries make the move. It switches any information in 440 tags to 490 tags, and any information in 490 tags to 440 tags. That seemed like the best way to go to me. To Test: locate some biblios with 440 or 490 tags filled. run bin/migration_tools/switch_marc21_series_info.pl -c observe that the information in the biblios has switched 4xx tags. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works as described. No errors. -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15604|0 |1 is obsolete| | --- Comment #15 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 15661 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15661&action=edit [SIGNED-OFF] Bug 5608 - command-line tool to switch information in 440 and 490 tags With the MARC21 standard moving from the 440 tag to the 490, this tool is to help libraries make the move. It switches any information in 440 tags to 490 tags, and any information in 490 tags to 440 tags. That seemed like the best way to go to me. There is also an option to create 830 tags for any 44 information, like authorities, that can't be represented in the 490 tag. To Test: locate some biblios with 440 or 490 tags filled. run bin/migration_tools/switch_marc21_series_info.pl -c observe that the information in the biblios has switched 4xx tags. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. No errors. -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=5608 --- Comment #16 from Michael Hafen <mdhafen@tech.washk12.org> --- Created attachment 15662 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15662&action=edit Proposed follow-up adding license statement Thanks for reminding me about the license statement requirement. -- 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=5608 --- Comment #17 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Ok, but put your name in it :-) Add a line # Copyright 2013 Michael Hafen <mdhafen@tech.washk12.org> -- 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=5608 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15662|0 |1 is obsolete| | --- Comment #18 from Michael Hafen <mdhafen@tech.washk12.org> --- Created attachment 15663 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15663&action=edit Proposed follow-up adding license and copyright statements -- 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=5608 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15663|0 |1 is obsolete| | --- Comment #19 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 15664 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15664&action=edit [SIGNED-OFF] Add license statement to switch_series_info CLI script License and copyright statement added. Thanks to Bernardo Gonzalez Kriegel for reminding me about this. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: add license information. No errors. -- 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=5608 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com QA Contact|koha-bugs@lists.koha-commun |paul.poulain@biblibre.com |ity.org | -- 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=5608 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch --- Comment #20 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * passes koha-qa.pl * I've added a tiny follow-up to exit immediately if the database is UNIMARC * no side effect risk, it's just a new script passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 --- Comment #21 from Paul Poulain <paul.poulain@biblibre.com> --- mmm... just an additionnal comment, jared, your decision/confirmation = haven't we decided to remove BEGIN { # find Koha's Perl modules # test carefully before changing this use FindBin; eval { require "$FindBin::Bin/../kohalib.pl" }; } ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15660|0 |1 is obsolete| | Attachment #15661|0 |1 is obsolete| | Attachment #15664|0 |1 is obsolete| | --- Comment #22 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16670 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16670&action=edit [PASSED QA] Bug 5608 - command-line tool to switch information in 440 and 490 tags With the MARC21 standard moving from the 440 tag to the 490, this tool is to help libraries make the move. It switches any information in 440 tags to 490 tags, and any information in 490 tags to 440 tags. That seemed like the best way to go to me. To Test: locate some biblios with 440 or 490 tags filled. run bin/migration_tools/switch_marc21_series_info.pl -c observe that the information in the biblios has switched 4xx tags. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works as described. No errors. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 --- Comment #23 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16671 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16671&action=edit [PASSED QA] Bug 5608 - command-line tool to switch information in 440 and 490 tags With the MARC21 standard moving from the 440 tag to the 490, this tool is to help libraries make the move. It switches any information in 440 tags to 490 tags, and any information in 490 tags to 440 tags. That seemed like the best way to go to me. There is also an option to create 830 tags for any 44 information, like authorities, that can't be represented in the 490 tag. To Test: locate some biblios with 440 or 490 tags filled. run bin/migration_tools/switch_marc21_series_info.pl -c observe that the information in the biblios has switched 4xx tags. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. No errors. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 --- Comment #24 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16672 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16672&action=edit [PASSED QA] Add license statement to switch_series_info CLI script License and copyright statement added. Thanks to Bernardo Gonzalez Kriegel for reminding me about this. http://bugs.koha-community.org/show_bug.cgi?id=5608 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: add license information. No errors. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 --- Comment #25 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16673 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16673&action=edit [PASSED QA] bug 5608 follow-up: exit immediately if UNIMARC Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5608 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #26 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org