Summary: | bulkmarcimport.pl - Some problems | ||
---|---|---|---|
Product: | Koha | Reporter: | Vitor Fernandes <vfernandes> |
Component: | Command-line Utilities | Assignee: | Vitor Fernandes <vfernandes> |
Status: | Patch doesn't apply --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | alexbuckley, gwilliams, mtompset, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17608 | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
bulkmarcimport.pl
Bug 14420 : bulkmarcimport.pl - Some problems Bug 14420 : bulkmarcimport.pl - Some problems |
Description
Vitor Fernandes
2015-06-19 10:22:52 UTC
Created attachment 40362 [details] [review] bulkmarcimport.pl Hi Vitor, can you please add a test plan? Some sample records might also be helpful to make this easier to test. Ah, also make sure test plan and problem description are part of your commit message! Created attachment 41338 [details] [review] Bug 14420 : bulkmarcimport.pl - Some problems http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14420 Created by: Vitor Fernandes <vfernandes@keep.pt> Sponsored by: KEEP SOLUTIONS Created attachment 41339 [details] [review] Bug 14420 : bulkmarcimport.pl - Some problems http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14420 Test plan: - Add one record with two ISBN using bulkmarcimport - Add the same record using bulkmarcimport with ISBN comparing - The comparing of ISBN isn't working because the bulkmarcimport are trying to check if isbn1 is in the column isbn of biblio table (check if equal). The column isbn of the first record is "isbn1 | isbn2". - Add one record with one ISBN using bulkmarcimport - Add the same record using bulkmarcimport and ISBN comparing - The first record will be updated but the items of the second record will not be added to the first one - Apply the patch - Add one record with two ISBN using bulkmarcimport - Add the same record using bulkmarcimport with ISBN comparing - The comparing of ISBN will work because the bulkmarcimport will use "like" comparing instead of "equal" - Add one record with one ISBN using bulkmarcimport - Add the same record using bulkmarcimport with ISBN comparing and updateadditems - The first record will be updated and the items of the second record will be added to the first one Created by: Vitor Fernandes <vfernandes@keep.pt> Sponsored by: KEEP SOLUTIONS (In reply to Vitor Fernandes from comment #0) > PROBLEM 1 > > If a record as some than one ISBN, the values are recorded in database like > 'isbn1 | isbn2 | isbn3'. > > In the script the ISBN match are only checking for exact ISBN matching. This is because: 020 - International Standard Book Number (R) -- The 020 field is repeatable. This is clearly bad data, but yes, we should attempt to parse for it. I don't like the multiple likes fix provided here. I would prefer a: my @isbns = parseIsbnField($isbn_field_value); foreach my $isbn (@isbns) { search for the individual isbn ... } sub parseIsbnField { my ($isbn_data) = @_; see if we can split out some ISBNs. ... return an array of the results. } Can you please rebase your patch it is currently not applying cleanly on master, as the below output shows: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 14420 : bulkmarcimport.pl - Some problems Using index info to reconstruct a base tree... M misc/migration_tools/bulkmarcimport.pl Falling back to patching base and 3-way merge... Auto-merging misc/migration_tools/bulkmarcimport.pl CONFLICT (content): Merge conflict in misc/migration_tools/bulkmarcimport.pl Failed to merge in the changes. Patch failed at 0001 Bug 14420 : bulkmarcimport.pl - Some problems The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-14420--bulkmarcimportpl---Some-problems-T8e2dA.patch You have new mail in /var/mail/vagrant |