[Bug 6851] New: A utility that will search out analytics records and set the MARC header appropriately.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6851 Bug #: 6851 Summary: A utility that will search out analytics records and set the MARC header appropriately. Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Command-line Utilities AssignedTo: gmcharlt@gmail.com ReportedBy: robin@catalyst.net.nz QAContact: koha-bugs@lists.koha-community.org In some cases, generated MARC data may not contain the correct headers to indicate sets (and parts of.) So I need to make a tool to fix this. It'll look at the 773$w headers to work out what needs to be linked. -- 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=6851 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|gmcharlt@gmail.com |robin@catalyst.net.nz -- 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=6851 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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=6851 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> 2011-09-07 06:10:09 UTC --- Created attachment 5331 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5331 Bug 6851 - script to set the MARC leader for resources with analytics This will find records that have a 773$w record that points to something else. For these, it will set the MARC leader position 19 value to 'c'. It will also find records that have a 001 value that is pointed to by another record's 773$w. For these, it sets the leader position 7 to 's'. With these set, Koha knows to present the links in the details views to connect the resources. Note: this is intended to be a post-migration script, in case your imported records had incomplete headers. -- 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=6851 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |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 the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6851 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |Rel_3_8 --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-24 11:38:16 UTC --- Updating Version : This ENH will be for Koha 3.8 -- 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=6851 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Rel_3_8 |master --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-25 15:05:50 UTC --- Bug versionned for master. entries will be made against rel_3_8 once the patch has been applied (see thread about that on koha-devel yesterday) -- 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=6851 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5331|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 8028 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8028&action=edit [SIGNED-OFF] Bug 6851 - script to set the MARC leader for resources with analytics This will find records that have a 773$w record that points to something else. For these, it will set the MARC leader position 19 value to 'c'. It will also find records that have a 001 value that is pointed to by another record's 773$w. For these, it sets the leader position 7 to 's'. With these set, Koha knows to present the links in the details views to connect the resources. Note: this is intended to be a post-migration script, in case your imported records had incomplete headers. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- 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=6851 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Robin, I was looking at your patch and had to make some notes for myself to 'unwrap' the relationships for myself. If my tests are correct, your script changes every record with childs into a serial AND a set. Most of the time those are 2 different things and it perhaps depends on what the library intended to do. After running your script my parent records show both links: show volumes and show analytics. When using Usecontrolnumber those will be the same (see bug 7609). Perhaps it would make sense to decide to either make the records a set or a serial and mark the child records correspondingly: I. Sets and volumes Set record: leader pos 19 = a = Set (http://www.loc.gov/marc/bibliographic/bdleader.html) A set record will show a link to the volumes. Link: search for 001 of set record in $w of child records (rcn index). Volume record: leader pos 19 = c = Part with dependent title (http://www.loc.gov/marc/bibliographic/bdleader.html) A volume record will show a link to the set. Link: search for $w in 001 to find the set record (Control-number index). II. Serial records and analytics Serial record: leader pos 7 = s = Serial (http://www.loc.gov/marc/bibliographic/bdleader.html) A serial record will show a link to search for analytics. Link: search for 001 in $w to find the analytical records (rcn index). Analytical record: Has 773, and leader pos 7 = a or b = monographic or serial component part (http://www.loc.gov/marc/bibliographic/bdleader.html) A analytical record will show a link to the parent using information from 773. Link: search for $w in 001 to find the serial record. (Control-number index). The other thing is that I think this needs a big warning sign. It rewrites a lot of data and perhaps it would be cool to have a confirmation flag or something. I know it's in the folder for migration scripts, perhaps only being super careful here. Both things are not enough for me to fail - going to sign-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=6851 --- Comment #6 from Robin Sheat <robin@catalyst.net.nz> --- I think I basically reverse engineered Koha to get the effect I wanted. -- 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=6851 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl QA Contact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: 1) General: I agree with Katrin that this script should be handled with care. In that aspect I would recommend to use some command line option(s) for actually making the change. Just running without options could print usage information, just like many other admin scripts do. As a side-note, I would be interested in a dry run option: How many records would you change before confirming to change them? (But that could be a followup, of course.) 2) I can understand that you may want to run this change on your data. But could the parent not be a collection too, or even an integrating resource (just mentioning two other possibilities in leader pos 7)? What about pos 19 on the parent site? As for the child, why per se value c on pos 19? Couldn't it be b (indep. title)? You don't touch pos 7 on the child, but is it already good? If you would like this script to be more generic, it should offer probably more options. If it is so very specific, is that clear enough now? Just asking ;) 3) You use ModBiblioMarc and mention this in a comment. Just glancing through code, I have the impression that we loose framework on the record. Am I right? 4) Why do you delete the hash key from $ctrl_to_bib in the second while loop? If you would reach a second child record pointing to that parent, don't you want to update it as well? Changing status to reflect the need for at least some answers. Thanks. -- 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=6851 --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- 1) Dry run options can certainly be possible. 2) Regarding the variety of different collection types, that's definitely something that could be considered. Mostly, I wrote it for a specific case that I had. Allowing it to be smart would add a whole host of complexity that would have made it take a lot longer to implement. Mostly, it's aimed as a starter for people who have similar use cases to improve upon. In my case, I had records from another (non-MARC) system that were linked via 001 and 773$w, but the leader had nothing to say that they were collections, and so Koha didn't show them up as such. This lets at least a basic level of linking happen. If you're in a position to determine what specific collection types you have, odds are you records are a lot cleaner than the ones I had anyway and probably include that information. 3) Losing the framework information might occur, I'm not sure. It wasn't an issue in my situation so I didn't check. 4) That hash is only used to track the parents we need to update, it doesn't have anything to do with the children. Once a parent has been updated once, there is no need to touch it again. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6851 --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Robin, referring to your comments: 1) Could you add at least an update option or so to prevent "accidents" for now? Dry run would be nice for future development. 2) I understand. 3) Please check. This could be an issue. 4) You are right, of course. Thanks for clarifying. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6851 --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Just a side note: I stumbled over some tabs instead of spaces. Some people do not like them ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6851 --- Comment #11 from Robin Sheat <robin@catalyst.net.nz> --- It's an annoying vim bug I haven't found a way to fix. I think this was written before I habitually perlcritic'ed everything. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org