[Bug 9453] New: Update records acording to the new UNIMARCField100Language system preference
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Bug ID: 9453 Summary: Update records acording to the new UNIMARCField100Language system preference Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.8 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 - high Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: rolando.isidoro@gmail.com CC: m.de.rooy@rijksmuseum.nl Depends on: 8347 The solution to bug 8347 introduced a new system preference, UNIMARCField100Language, which allows us to set the value for the mandatory Language of cataloguing field in the UNIMARC field 100 builder form. Before this bug was fixed all values on that field were set to 'fre', so we need to update all the existing records to match the new system preference. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Rolando Isidoro <rolando.isidoro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |rolando.isidoro@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 --- Comment #1 from Rolando Isidoro <rolando.isidoro@gmail.com> --- Created attachment 14778 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14778&action=edit Script to update field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference This script aims to allow users to update UNIMARC field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference in a easy way. The script uses KOHA's API methods to ensure that the DB data remains valid and that it gets reindexed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Rolando Isidoro <rolando.isidoro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 --- Comment #2 from Vitor Fernandes <vfernandes@keep.pt> --- Created attachment 14784 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14784&action=edit Bug 9453: Update records acording to the new UNIMARCField100Language system preference Script to update field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference This script aims to allow users to update UNIMARC field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference in a easy way. The script uses KOHA's API methods to ensure that the DB data remains valid and that it gets reindexed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14778|1 |0 is patch| | Attachment #14778|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=9453 --- Comment #3 from Vitor Fernandes <vfernandes@keep.pt> --- Created attachment 14785 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14785&action=edit [SIGNED-OFF] Bug 9453: Update records acording to the new UNIMARCField100Language system preference Script to update field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference This script aims to allow users to update UNIMARC field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference in a easy way. The script uses KOHA's API methods to ensure that the DB data remains valid and that it gets reindexed. Signed-off-by: Vitor Fernandes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14784|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=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |vfernandes@keep.pt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 --- Comment #4 from Rolando Isidoro <rolando.isidoro@gmail.com> --- Tested the patch in a standard Koha 3.8.5 installation and it works as described and expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hi Rolando, Please fix the following perlcritic issues: Bareword file handle opened at line 71, column 5. See pages 202,204 of PBP. Two-argument "open" used at line 69, column 5. See page 207 of PBP. Bareword file handle opened at line 69, column 5. See pages 202,204 of PBP. + the script has to display the help if it is called without parameter. Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 --- Comment #6 from Vitor Fernandes <vfernandes@keep.pt> --- Created attachment 14822 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14822&action=edit [SIGNED-OFF] Bug 9453: Update records acording to the new UNIMARCField100Language system preference Problems with perlcritic corrected. Script without parameters shows help. Signed-off-by: Vitor Fernandes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14785|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=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Vitor, Thanks but your patch is not correct. Your last patch does not create the new file, so I cannot apply it. Please resubmit it and switch the status to "Needs Signoff". Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14785|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=9453 Vitor Fernandes <vfernandes@keep.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Vitor Fernandes <vfernandes@keep.pt> --- Hi Jonhatan, I removed the first from obsolete status because it can create the file. Sorry but now I don't have time to create a new patch for this bug. I think this way it will work because it will apply the "obsolete" patch first and the file should be created. Then the correct patch will replace the script file. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14785|0 |1 is obsolete| | Attachment #14822|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 15145 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15145&action=edit Bug 9453: Update records acording to the new UNIMARCField100Language system preference Script to update field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference This script aims to allow users to update UNIMARC field 100a language value with the one defined in the "UNIMARC field 100 default language" system preference in a easy way. The script uses KOHA's API methods to ensure that the DB data remains valid and that it gets reindexed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9453 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- KOHA -> Koha ? Just a few questions: 1) What about: use FindBin; my $module="$FindBin::Bin/../kohalib.pl"; eval { require $module }; Seems to overcome the warning: "require" statement with library name as string at line 26, column 12. Use a bareword instead. 2) You want to modify pos 22-24 (Language of cataloging). You do that by: $subfield =~ s/fre/$default_unimarc_language/g Why global? You only want to do this once? Since there actually is no check on the contents of the preference, this variable may contain a string that is too short or too long. In that case you are shifting characters in field 100 and corrupting your data. Could you check the length? And simply replace positions 22-24? Also note that fre is hardcoded here. I would favor moving it to a script parameter. Looking at the code of ModBiblioMarc, I wonder if you need this regexp at all. The code there appears to correct the language in 100a while checking the length! 3) Why use ModBiblioMarc and not ModBiblio? See POD comment for ModBiblioMarc. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org