Bug 19164: Add MARC modification template support to misc/stage-file.pl.
https://bugs.koha-community.org/show_bug.cgi?id=19164
Bug 19164 - Allow MARC modification templates to be used in staged MARC imports
Patch checks for duplicate MARC modificiation templates and if only one is
found that matches the name given on the command line, submits the batch
staging of the input files using that template.
Test plan:
1) In the staff web client got to "Home › Tools › MARC modification templates" and create a MARC Modification Template called "Test Bug 19164". Set the action to be "Copy field 999$l to 998$l using RegEx s/NASH/FLASH/ if 999$l matches NASH"
2) Download the test MARC record from this bug into a file called marc1.mrc into your koha dev user's home directory.
3) Run misc/stage_file.pl with the command line:
misc/stage_file.pl --file ~/marc1.mrc --add-items --marcmodtemplate "Test Bug 19164" --item-action replace --comment "testing MARC mod templates on batch staging"
4) In the staff client, go to Home › Tools › Manage staged MARC records and check that the file is visible and in status "Staged"
5) Click on the filename to bring up details of the staged batch, and then click on "Basic Christianity. Stott, John R. W. (
0802811892)". Note that there is a 998$l field with the value "FLASH" that has been created using the MARC Modification Template.
Signed-off-by: Mackey Johnstone <mackeyfj@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>