Bug 32174 - bulkmarcimport.pl ignore items info when using -update
Summary: bulkmarcimport.pl ignore items info when using -update
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-10 21:59 UTC by Pablo AB
Modified: 2023-03-16 16:54 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2022-11-10 21:59:00 UTC
Using this command:

/usr/share/koha/bin/migration_tools/bulkmarcimport.pl 
  -v 
  -insert 
  -biblios 
  -framework "BKS" 
  -file /home/me/books.mrc 
  -l /tmp/books.log

works fine. If changes are made (on normal fields and on 952) on MRC and then we run:

/usr/share/koha/bin/migration_tools/bulkmarcimport.pl 
  -v 
  -match Control-number,001 
  -update 
  -biblios 
  -framework "BKS" 
  -file /home/me/books.mrc 
  -l /tmp/books.log

the information is update/overwritten, but *only at biblio level*. Item info remains untouched.

The solution maybe could be to add a --add-items-if-match option. To include -all option and have consistency with web interface --add-items-if-nomatch and --add-items-always could be added.
Comment 1 Katrin Fischer 2022-11-13 22:41:49 UTC
Hi Pablo, there are scripts that mimick the staged import that are probably better suited for this task: stage_file.pl and commit_file.pl

To my knowledge matching/updating items was not developed for bulkmarcimport.pl yet, which would make this an enhancement.
Comment 2 Pablo AB 2023-03-16 16:54:30 UTC
Thanks Katrin! Being 952 field part of the imported records, users might think that, by default, bulkmarcimport will update the whole record. In this scenario (mismatch between what's expected and what happen) could be considered a bug.

Would be nice at least a warning (perldoc on script and on the manual).