Koha-clms/C4
Andreas Jonsson 4111f4f186
Bug 24348: Pass marc record to _passes_required_checks
Test plan:

* Add record matching rule:

 Matching rule code: test
 Description: 001 and 003
 Match threshold: 1000
 Record type: Bibliografic record

 Match points:
    Search index: Control-number
    Score: 1000
    Tag: 001
    Subfields:
    Offset:
    Length:
    Normalization rule: none

 Required match checks:

    Source (incoming) record check field

    Tag: 003
    Subfields:
    Offset:
    Length:
    Normalization rule: none

    Target (database) record check field

    Tag: 003
    Subfields:
    Offset:
    Length:
    Normalization rule: none

* Note the match rule identity number.
* Stage a marc-file for import, for instance this one ftp://ftp.libris.kb.se/pub/export2/X/marc/X.20200104.marc

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/stage_file.pl --match 4 --file 'X.20200104.marc' --format ISO2709 --comment 'test'" kohadev

* Note the batch number and commit the file using the batch number:

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/commit_file.pl --batch-number 1" kohadev

* Again, stage the same marc-file  for import:

sudo /usr/sbin/koha-shell -c "perl /home/vagrant/kohaclone/misc/stage_file.pl --match 4 --file 'X.20200104.marc' --format ISO2709 --comment 'test'" kohadev

* Note the number of records matched.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-28 14:54:29 +00:00
..
AuthoritiesMarc
…
Barcodes
…
ClassSortRoutine
…
ClassSplitRoutine
…
Creators
…
External
…
Form
…
Heading
…
ILSDI
…
Installer
…
Labels
…
Linker
…
Members
…
OAI
…
Output
…
Patroncards
…
Reports
…
SIP
…
Search
…
Serials
…
Utils
…
Accounts.pm
…
Acquisition.pm
…
Auth.pm
…
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm
…
Auth_with_ldap.pm
…
Auth_with_shibboleth.pm
…
AuthoritiesMarc.pm
…
BackgroundJob.pm
…
Barcodes.pm
…
Biblio.pm
…
Bookseller.pm
…
Boolean.pm
…
Breeding.pm
…
Budgets.pm
…
Calendar.pm
…
Charset.pm
…
Circulation.pm
…
ClassSortRoutine.pm
…
ClassSource.pm
…
ClassSplitRoutine.pm
…
Context.pm
…
Contract.pm
…
CourseReserves.pm
…
Creators.pm
…
Debug.pm
…
HTML5Media.pm
…
Heading.pm
…
HoldsQueue.pm
…
Images.pm
…
ImportBatch.pm
…
ImportExportFramework.pm
…
InstallAuth.pm
…
Installer.pm
…
ItemCirculationAlertPreference.pm
…
Items.pm
…
Koha.pm
…
Labels.pm
…
Languages.pm
…
Letters.pm
…
Linker.pm
…
Log.pm
…
MarcModificationTemplates.pm
…
Matcher.pm Bug 24348: Pass marc record to _passes_required_checks 2020-01-28 14:54:29 +00:00
Members.pm
…
Message.pm
…
NewsChannels.pm
…
Output.pm
…
Overdues.pm
…
Patroncards.pm
…
Print.pm
…
Record.pm
…
Reports.pm
…
Reserves.pm
…
Ris.pm
…
RotatingCollections.pm
…
SMS.pm
…
Scheduler.pm
…
Scrubber.pm
…
Search.pm
…
Serials.pm
…
Service.pm
…
ShelfBrowser.pm
…
SocialData.pm
…
Stats.pm
…
Suggestions.pm
…
TTParser.pm
…
Tags.pm
…
Templates.pm
…
TmplToken.pm
…
TmplTokenType.pm
…
UsageStats.pm
…
XISBN.pm
…
XSLT.pm
…