https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44192
Bug ID: 44192
Summary: stage_file.pl does not say when the --match rule does
not exist and a default rule is used instead
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Command-line Utilities
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
Target Milestone: ---
misc/stage_file.pl --match <id> falls back to a built-in ISBN (020$a) + title
rule when no matching rule has that id (lines 154-164). --help mentions the
fallback, but at run time nothing says it happened: the staging report looks
exactly like a run with the rule asked for, only with "Number of records
matched: 0" (or whatever the default rule finds), and the exit status is 0.
This matters because the ids differ between installs. On an install made with
the web installer's defaults the optional MARC21 matching rules are not loaded,
so marc_matchers is empty and a --match id copied from documentation or from
another server does not exist. Records without an ISBN can then never match,
and committing the batch adds every one of them as a new record next to the
copy already in the catalogue. A typo in the id has the same effect.
To reproduce (main):
1. SELECT matcher_id FROM marc_matchers; pick an id that is not there, e.g.
999.
2. Export one record that is in the catalogue: misc/export_records.pl
--format=iso2709 --filename=/tmp/one.mrc --starting_biblionumber=5
--ending_biblionumber=5
3. misc/stage_file.pl --file /tmp/one.mrc --match 999
4. The report has no line about rule 999; "Number of records matched: 0"; exit
0.
Expected: a line such as "Matching rule 999 not found; using the default ISBN
and title rule" (or refusing to stage, as the staff interface only offers
existing rules), and the rule actually used named in the report.
Reproduced on main (6ff8078) and on Koha 26.05.05.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/