Summary: | bulkmarcimport.pl doesn't replace 001 when keepids is not specified | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Cormack <chris> |
Component: | Command-line Utilities | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED INVALID | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | P5 - low | CC: | frank.hansen, julian.maurice, lculber, magnus |
Version: | Main | ||
Hardware: | PC | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
An utility to complement bulkmarcimport.pl
Bug 4226 : New script to keep 001 numbers when importing Bug 4226: Follow to address comment #9 |
Description
Chris Cormack
2010-05-21 01:24:38 UTC
Anyone know what the current state of this is? Has this been superseded by bug 6113 that Galen is working on or is it otherwise related? Created attachment 6525 [details] [review] An utility to complement bulkmarcimport.pl Rather then improve bulkmarcimport.pl, sysno_keeper.pl works on biblio, biblioitems and items tables with a series of SQL commands, to reassign biblionumber and biblioitemnumber copying them from a control or data field (default 001). Looks like this should be "needs signoff". Attached script looks good but needs the copyright headers fixed. Also should we change the description of this bug? Patch is not in git format, fixing now Created attachment 10578 [details] [review] Bug 4226 : New script to keep 001 numbers when importing Git formatted patch with fixed copyright headers. Script seems to work as expected, but a few remarks: 1. GetOptions wait for a string after -a and -b parameters, which are boolean flags according to POD 2. --commit option is not used 3. binmode(STDOUT, ":utf8") is doing something strange. date outputs: jeudi 9 août 2012, 15:47:12 (UTC+0200) if i remove binmode line, it looks ok 4. some printed strings have newline at end, some others don't. Some strings are printed only when $verbose is true while others are always printed (can't figure out why). Maybe you should use some wrapper sub like this: sub print_log { print @_, "\n" if $verbose; } 5. italian language (lines 126-127) should be translated. 6. More important: what happens if some ids (authid or biblionumber) are the same when resetting the primary key? I tested this: perl misc/migration_tools/sysno_keeper.pl -a 1 -v -t 009 having 2 records containing the same data in 009 field. Output: 1. dropping primary key for auth_header.authid 2. filling in auth_header.authid... 3. rebuilding primary key for auth_header.authid DBD::mysql::db do failed: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '12345678' for key 'PRIMARY' at misc/migration_tools/sysno_keeper.pl line 104. Is there a way to detect such errors and cancel previous modifications ? Failed QA for 1 and 2. A follow-up for 6 would be great! Created attachment 43611 [details] [review] Bug 4226: Follow to address comment #9 It would be appreciated if testing of this script was redone to confirm if all the points were handled properly. The only point truly outstanding still is 6. We had some behaviour changes that possibly affect this, like bug 18014. We nowadays enforce the 001 to be Koha's authid consistently. I am going to close this as INVALID, please reopen if you disagree! |