]> git.koha-community.org Git - koha.git/commit
Bug 26199: Include LDR for match check/match point
authorDavid Cook <dcook@prosentient.com.au>
Thu, 17 Dec 2020 04:05:39 +0000 (04:05 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 19 Mar 2021 13:38:49 +0000 (14:38 +0100)
commit5d934fb0dc4223a57e70c33bf499136804cb76d6
tree60c2b4d8ae2ca439ae847c5a98da458ab4dee1c0
parent3cd1ac19db164a99e95b590d641fb2405d0c54dc
Bug 26199: Include LDR for match check/match point

This patch adds the ability to specify the LDR instead of a numeric tag
when defining match checks in record matching rules. This is particularly
useful for checking LDR6 "Type of record" when importing records.

Test plan:
0. prove t/Matcher.t

1. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=1
2. Click "Save" and choose "MARCXML"
3. Copy bib-1.marcxml to bib-1-mod.marcxml
4. Change "01344cam a22003014i 4500" to "01344cmm a22003014i 4500"
5. Go to http://localhost:8081/cgi-bin/koha/admin/matching-rules.pl?op=edit_matching_rule&matcher_id=3
6. Click "Add match check"
7. Fill out the match checks:
Source:
Tag: LDR
Offset: 6
Length: 1
Target:
Tag: LDR
Offset: 6
Length: 1

8. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
9. Choose "bib-1-mod.marcxml" and click "Upload file"
10. Choose "KohaBiblio (999$c)" for "Record matching rule"
11. Click "Stage for import"
12. Click "Manage staged records" on resulting page
13. Note the "Match type" says "No match"

14. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
15. Choose "bib-1.marcxml" and click "Upload file"
16. Choose "KohaBiblio (999$c)" for "Record matching rule"
17. Click "Stage for import"
18. Click "Manage staged records" on resulting page
19. Note the Match type says "Match found"

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit baa2260503356af15ad4df835a24abf084ec41a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Matcher.pm
t/Matcher.t